On 3 December 2014 at 20:12, Cliff McDiarmid <[email protected]> wrote:
> Sent: Wednesday, December 03, 2014 at 7:44 PM > From: "Bruce Dubbs" <[email protected]> > To: "BLFS Support List" <[email protected]> > Subject: Re: [blfs-support] Moving Grub to a different partition > Cliff McDiarmid wrote: > > Hi > > I have two LFS installations, on different partitions, on the same > > drive(/dev/sda). I have the older LFS(/dev/sda7) , with grub, booting at > > present to the grub menu. I need the new LFS(/dev/sda6) to take over the > > booting, so I've installed Grub to this LFS. > > Am I right in thinking that I now need to run(from the new LFS): > > > > 'grub-install --root-directory=/boot/grub /dev/sda' > > > > to activate, having earlier deleted Grub from the old LFS and copied > the'grub.cfg' file over? > > > >What I recommend is to create a separate partition for /boot. It does > >not need to be large. 100 or 200 MB is sufficient. I use ext2 since a > >journal is not really needed for a partition that is rarely written. > > >Then move all your kernels, configs, and System-maps there and mount as > >/boot. Enter the partition in in fstab. > > >Now all your installs can share the same /boot and there is no confusion > >about how to share kernels or where grub.cfg is located. > > Yes your right, this is the best way. I've not gone for it in the past, > but now's the time. > > many thanks Another advantage of the approach Bruce has detailed is that you can then, if you wish, have /boot on a completely separate device. I boot from tiny USB flash drives (formatted with ext2) which makes a very flexible system. I can clone new flash drives easily with dd and use them to boot other boxes just by changing the path to the new rootfs. I use syslinux rather than grub, but the principle is the same. I've now gone a step further, and using a 16GB flash drive (~£6) I have three GPT partitions, one /boot (100MB), one swap/hibernate (9GB), and the remainder for a recovery LFS that I can boot into, if necessary, from the syslinux menu. As a point of information, a separate /boot doesn't have to be mounted in order to function. Richard
-- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
