Jump to content
|Topic||Stats||Last action by|
|I'm Finally Ditching Windows Phone for Android||
|Formula 1 World Championship 2015 Season Discussion||
|Budman and IT security experts, please come in man...||
|Failing hard drive question||
|Don't be racist ... be like Mario!||
Posted 14 November 2006 - 05:25
Posted 03 March 2007 - 15:44
Posted 07 March 2007 - 22:17
Posted 28 April 2007 - 09:44
Boot the livecd.
Start a terminal.
find /boot/grub/stage1 // Will print something like (hd0,1)
Posted 11 November 2009 - 00:10
Posted 27 January 2015 - 22:09
Speaking of bootloaders!
I opted out from using GRUB (or other chain loaders) and use the EFI stub in the Linux kernel and then use efibootmgr to add the kernel and the parameters as a boot entry. I don't find a reason to load a bootloader which then loads the OS when you can make UEFI load the OS directly.
If the kernel gets damaged or you screw up the parameters then you can use the EFI shell (comes with the board) to manually load the kernel.
What I do is:
efibootmgr -b 0000 -d /dev/sda -p 1 -c -L "Arch Linux EFI stub" -l /vmlinuz-linux -u "root=UUID=3e65a7c4-0a24-44d5-aeeb-e6da72343a34 rootfstype=btrfs rootflags=ssd,discard,noatime,space_cache,compress=lzo,autodefrag,subvol=archrootfs rw quiet initrd=/initramfs-linux.img"
The 0000 is the boot entry in the UEFI boot entry list index. The boot order can be chosen with efibootmgr. I only have two entries, 0000 and 0002 (EFI shell).
The EFI system partition is partition 1 (-p 1, which is default) on HD 0 (-d /dev/sda) and is mounted at /boot in the OS. Add the custom text and then tell it which file to load (-l /vmlinuz-linux).
You can't overwrite a boot entry so you have to delete the entry first. Not specifying the list index ("bootnum") and using the -c option (create) will make it create a new entry at a unused index.
I would highly recommend this if you don't have a lot of operating systems to boot or non-UEFI compliant operating systems. Sure, having custom boot entries for failsafe or recovery modes won't be there but you can create entries for those too or even create shell commands that you can use in the EFI shell. The wiki for Arch Linux covers this subject and works on all kernels that has the EFI stub compiled into it.
Requirements: GPT on the drive and a UEFI system patition (a minimum 100MB or more depending on the size of the kernel(or kernels you want to load) and the standard says that it SHOULD be the first partition on the disk.
BTW: Don't mind the autodefrag root mount option, it only defrags metadata, it removes dead meta data, moves meta data etc, and does not do actual sector defragmentation.