Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sun, Jan 22, 2017 at 10:39 PM, Walter Dneswrote: > > I notice some comments that menu.lst is "legacy GRUB", and GRUB2 has > gone off the deep end with a ton of config files. Unless you want to customize your grub menu in a way not desired or anticipated by the grub2 developers, you just have to edit "/etc/default/grub" and run "grub-mkconfig -o /boot/grub/grub.cfg".
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sun, Jan 22, 2017 at 6:02 AM, Neil Bothwickwrote: > > GRUB2 counts partitions from 1, but drives from 0 (a brilliant > decision) so these would be (hd1,6) and (hd1,7). They should've changed hd0/hd1/... to hda/hdb/... when they changed (hd0,msdos1) to correspond to /dev/sda1 [as opposed to (hd0,0) in grub1!], (hd1,gpt2) to correspond to /dev/sdb2, ... :(
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sun, 22 Jan 2017 22:39:09 -0500, Walter Dnes wrote: > > Why are you using GRUB now, does LILO not work on USB sticks? > > Apparently, further development on LILO has ceased according to... > http://www.phoronix.com/scan.php?page=news_item=LILO-Bootloader-EOY > I don't need it NOW, but I do want to be ready for when I do run into a > situation that LILO can't handle. If I'm going to be playing around and > learning and possibly screwing up, I'd rather do it to a USB key install > than to a hard drive install. Fair point. > I notice some comments that menu.lst is "legacy GRUB", and GRUB2 has > gone off the deep end with a ton of config files. GRUB2 has one config file, but it's now called grub.cfg. However, GRUB2 can also generate its own config, and that uses a ton of other config files, for values of ton <3. All you need to edit is /etc/default grub and maybe the custom menu file in /etc/grub.d. > Is syslinux/extlinux > still supported? I wonder if that might be simpler while still useful. Yes and no. It works but it is nowhere near as clearly documented as GRUB. It may take you a little while to get the hang of GRUB, but that's what you are planning for, so fine. But it will all make sense soon enough and it is the most versatile bootloader out there. -- Neil Bothwick Despite the cost of living, have you noticed how it remains so popular? pgptNCKEVSrIQ.pgp Description: OpenPGP digital signature
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sun, Jan 22, 2017 at 11:02:21AM +, Neil Bothwick wrote > On Sun, 22 Jan 2017 08:59:43 +, Mick wrote: > > > The nomenclature for partions 6 and 7 on the USB key will be (hd1,5) > > and (hd1,6) respectively, as long as the USB key has been detected as > > the 2nd drive on the PC (/dev/sdb). > > GRUB2 counts partitions from 1, but drives from 0 (a brilliant decision) > so these would be (hd1,6) and (hd1,7). > > Why are you using GRUB now, does LILO not work on USB sticks? Apparently, further development on LILO has ceased according to... http://www.phoronix.com/scan.php?page=news_item=LILO-Bootloader-EOY I don't need it NOW, but I do want to be ready for when I do run into a situation that LILO can't handle. If I'm going to be playing around and learning and possibly screwing up, I'd rather do it to a USB key install than to a hard drive install. I notice some comments that menu.lst is "legacy GRUB", and GRUB2 has gone off the deep end with a ton of config files. Is syslinux/extlinux still supported? I wonder if that might be simpler while still useful. -- Walter DnesI don't run "desktop environments"; I run useful applications
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sunday 22 Jan 2017 11:02:21 Neil Bothwick wrote: > On Sun, 22 Jan 2017 08:59:43 +, Mick wrote: > > The nomenclature for partions 6 and 7 on the USB key will be (hd1,5) > > and (hd1,6) respectively, as long as the USB key has been detected as > > the 2nd drive on the PC (/dev/sdb). > > GRUB2 counts partitions from 1, but drives from 0 (a brilliant decision) > so these would be (hd1,6) and (hd1,7). Oops! Yes, sorry Walter, I missed that in my previous message! -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Sun, 22 Jan 2017 08:59:43 +, Mick wrote: > The nomenclature for partions 6 and 7 on the USB key will be (hd1,5) > and (hd1,6) respectively, as long as the USB key has been detected as > the 2nd drive on the PC (/dev/sdb). GRUB2 counts partitions from 1, but drives from 0 (a brilliant decision) so these would be (hd1,6) and (hd1,7). Why are you using GRUB now, does LILO not work on USB sticks? -- Neil Bothwick Znqr lbh ybbx! pgpjv6zlOxzhx.pgp Description: OpenPGP digital signature
Re: [gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
On Saturday 21 Jan 2017 00:44:15 Walter Dnes wrote: > I've been using LILO for over 15 years, but I'm a total newbie at > GRUB2, so the following may be totally out to lunch. Would the following > setup work for a USB key with multiple partitions with a different OS or > variant in each partition? > > GRUB2 in MBR It can be the MBR of the USB key, or the MBR of the hard drive. It makes sense it is in the MBR of the USB key of course, but bear in mind some older PCs BIOS will not boot from USB keys. > * extended partition 1 covers entire USB key > * logical partition 5, ext2fs, 1 megabyte, containing directory /boot/grub > containing file menu.lst > * logical partition 6, ext2fs, containing an OS > * logical partition 7, ext2fs, containing an OS > * etc, etc Or, you could just use GPT. > Assuming that the key shows up as /dev/sdb, would the entries in > menu.lst for partions 6 and 7 be (hd1,5) and (hd1,6), respectively? I think you are confusing GRUB2 with the older GRUB legacy? There is no menu.lst with GRUB2. Instead /boot/grub/grub.cfg is generated when you run: grub-mkconfig -o /boot/grub/grub.cfg taking its input from: /etc/default/grub and /etc/grub.d/* The nomenclature for partions 6 and 7 on the USB key will be (hd1,5) and (hd1,6) respectively, as long as the USB key has been detected as the 2nd drive on the PC (/dev/sdb). > And > what would be the command to install GRUB2 to the MBR of the USB key? grub-install -v /dev/sdb and then to create and install its configuration files mount your USB key and run: grub-mkconfig -o /run/media/walter//boot/grub/grub.cfg assuming that your USB key has been mounted under /run/media/walter/ and the directory /boot on the USB key is where you want your GRUB2 files installed. Should you need to have a look here as well for additional info: https://wiki.gentoo.org/wiki/GRUB2 https://www.gnu.org/software/grub/manual/grub.html HTH. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
[gentoo-user] [OT] How to do GRUB2 multiple partions on USB key?
I've been using LILO for over 15 years, but I'm a total newbie at GRUB2, so the following may be totally out to lunch. Would the following setup work for a USB key with multiple partitions with a different OS or variant in each partition? GRUB2 in MBR * extended partition 1 covers entire USB key * logical partition 5, ext2fs, 1 megabyte, containing directory /boot/grub containing file menu.lst * logical partition 6, ext2fs, containing an OS * logical partition 7, ext2fs, containing an OS * etc, etc Assuming that the key shows up as /dev/sdb, would the entries in menu.lst for partions 6 and 7 be (hd1,5) and (hd1,6), respectively? And what would be the command to install GRUB2 to the MBR of the USB key? -- Walter DnesI don't run "desktop environments"; I run useful applications