Re: [gentoo-user] Re: grub-2 update
On Fri, Jul 17, 2015 at 08:36:51AM +0100, Neil Bothwick wrote: could try it on. But it's a headless MythTV backend in the loft, so there will be fun and games if it doesn't boot. Wouldn't it be more accurate to say there will be _no_ fun and games if it doesn't boot? -- wraeth wra...@wraeth.id.au GnuPG Key: B2D9F759 signature.asc Description: Digital signature
Re: [gentoo-user] Re: grub-2 update
On Thu, 16 Jul 2015 19:54:31 -0400, Jonathan Callen wrote: The Gummiboot project is no longer maintained, it has been merged into systemd as systemd-boot (note that using any other part of Systemd should *not* be required to use systemd-boot, but I don't know for sure because I do not have any non-systemd systems). Interesting, I missed that. I've re-emerged systemd with the gnuefi flag and it just worked. I do have a UEFI system without systemd that I could try it on. But it's a headless MythTV backend in the loft, so there will be fun and games if it doesn't boot. -- Neil Bothwick Top Oxymorons Number 11: Terribly pleased pgpiJMGvHsJzD.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Re: grub-2 update
On Fri, Jul 17, 2015 at 10:40:16AM +0100, Neil Bothwick wrote: On Fri, 17 Jul 2015 18:45:59 +1000, wraeth wrote: could try it on. But it's a headless MythTV backend in the loft, so there will be fun and games if it doesn't boot. Wouldn't it be more accurate to say there will be _no_ fun and games if it doesn't boot? Well, with no TV to watch, I'd have to entertain the wife somehow ;-) Touché -- wraeth wra...@wraeth.id.au GnuPG Key: B2D9F759 signature.asc Description: Digital signature
Re: [gentoo-user] Re: grub-2 update
On Fri, 17 Jul 2015 18:45:59 +1000, wraeth wrote: could try it on. But it's a headless MythTV backend in the loft, so there will be fun and games if it doesn't boot. Wouldn't it be more accurate to say there will be _no_ fun and games if it doesn't boot? Well, with no TV to watch, I'd have to entertain the wife somehow ;-) -- Neil Bothwick Hard work has a future payoff. Laziness pays off now. pgpbIZYILBNMU.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Re: grub-2 update
Solution that works for me: - Compile the kernel with everything built-in leaving modules for the few things that really need to be reloadable. Turn everything in the bloody thing off. This avoids the need for a kernel-specific filestem in the initrd. - This since you don't need any modules in the initrd a simple, static solution with busybox and init something like: #!/bin/busybox sh /bin/busybox --install -s; sync; mount -t proc none /proc; mount -t sysfs none /sys; /sbin/mdadm --verbose --assemble --scan; /sbin/vgscan--verbose; /sbin/vgchange --verbose -a y /dev/vg00/root; mount /dev/vg00/root /mnt/root; mount; exec /sbin/switch_root /mnt/root /sbin/init; Add whatever you need for encryped filesytems, but it won't have to change over time unless you change the boot requirements. Add a copy of busybox, switch_root, init, a static copy of lvm into something like /boot/standard-init.cpio.gz. Mine is in /usr/src/initrd with two sub's standard and rescue differing only in the init script. A second initrd the last line commented out as /boot/rescue-init.cpio.gz for cases where switch_root gets unhappy. #!/bin/bash --login cd $(dirname $0); for i in */init; do dir=$(dirname $i); name=$(basename $dir); ( cd $dir; kleenfilz; find . | cpio -o -Hnewc | gzip -9v /boot/$name.cpio.gz) done wait; ls -lt /boot; exit 0; builds and installs the initrd's easily enough (kleenfilz is a shell sub that removes editor cruft, no reason to leave *~ files :-). - Add /etc/grub.d/09_custom (i.e., into the config *before* the junk that 10 adds in) like the one below. Note that this uses the symlink /boot/vmlinuz with the static init. The current portion comes from a second vmlinuz.stable symlink I curate manually to the last kernel that lived for a while and never, ever caused problems [not that I've ever botched a config siwtch. no, really...]. The standard link and fixed init-script allow a static copy of the grub config file with /boot/vmlinuz and /boot/standard.cpio.gz hardwired. #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry 'current standard' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e18157fe-1330-4cbb-8374-125d9c26e360' { load_video if [ x$grub_platform = xefi ]; then set gfxpayload=keep fi insmod gzio insmod part_msdos insmod xfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 e18157fe-1330-4cbb-8374-125d9c26e360 else search --no-floppy --fs-uuid --set=root e18157fe-1330-4cbb-8374-125d9c26e360 fi echo'Loading Linux ...' linux /boot/vmlinuz root=/dev/sdc1 ro echo'Loading initrd ...' initrd /boot/standard.cpio.gz } menuentry 'current rescue' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e18157fe-1330-4cbb-8374-125d9c26e360' { load_video if [ x$grub_platform = xefi ]; then set gfxpayload=keep fi insmod gzio insmod part_msdos insmod xfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 e18157fe-1330-4cbb-8374-125d9c26e360 else search --no-floppy --fs-uuid --set=root e18157fe-1330-4cbb-8374-125d9c26e360 fi echo'Loading Linux ...' linux /boot/vmlinuz root=/dev/sdc1 ro echo'Loading initrd ...' initrd /boot/rescue.cpio.gz } - Run grub2-mkconfig once. - Never touch the grub.cfg file ever again (unless you switch the boot filesystem type). If I went from XFS - btrfs for the root filesystem I'd have to hack the insmod xfs entries, nothing more. -- Steven Lembark 3646 Flora Pl Workhorse Computing St Louis, MO 63110 lemb...@wrkhors.com +1 888 359 3508
Re: [gentoo-user] Re: grub-2 update
Am 16.07.2015 um 22:05 schrieb James: I spent days during early kernel upgrades getting grub2 happy. You only need to run `grub2-mkconfig -o /boot/grub/grub.cfg` after each kernel update. I'm using grub2 not for such a long time, but I made some kernel upgrades since I switched from grub-legacy to grub2 and had no problems so far. The last (2) kernel updates when smooth. I was also curious if anyone else has upgraded to grub- 2.02_beta2-r7 ? I don't know when or if it was updated after I switched to grub2, but I have grub 2.02_beta2-r7 installed and had no problems with it either. But what can happen at worst when you update a boot loader? That your boot loader fails to boot. So you can still boot from a LiveCD and select the option Boot from harddrive. Then you can easily fix the boot loader.
Re: [gentoo-user] Re: grub-2 update
On 16-Jul-15 22:08, James wrote: I have similar setup as you and upgraded grub without any problem. If beta2-r3 worked for you, beta2-r7 will as well. If you did not disable /boot automount, there are no special steps needed. Portage will mount /boot, update grub, and dismound afterwards... AH do tell me more:: /dev/sda1 /bootext2defaults,noatime 0 2 /dev/sda3 /ext4defaults,noatime 0 1 /dev/sda4 /usr/local ext4defaults,noatime 0 1 How do I make sure it's set to automount? It is per default so. You can only disable it by some variable (forgot its name). If you want to be sure, simply mount /boot (if it is not yet) before updating grub. changes I should make ?? I've been bitten too many times on kernel updates to not be very cautious-- No changes are necessary. Config-files remain as they were. I'have been using grub2 since it went stable and never had any problem with it... Jarry ___ This mailbox accepts e-mails only from selected mailing-lists! Everything else is considered to be spam and therefore deleted.
Re: [gentoo-user] Re: grub-2 update
On Thu, 16 Jul 2015 20:01:29 + (UTC), James wrote: I gave grub-2 a try earlier this week and once again couldn;t figure out how to install that mini-OS that bootstraps a boot loader which bootstraps a boot loader which loads code that loads a kernel. So back to grub:0 for me I do not really want to go to back to grub-legacy. I do not what to be bound to (u)efi booting either. You could just lie to me and make us both happy? If you have UEFI, then just use Gummiboot, it's much simpler. -- Neil Bothwick If it ain't broke, break it and charge for repair. pgpebtup_Mj5U.pgp Description: OpenPGP digital signature