[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wish to ALMOST clone a logical partition



On Lu, 26 mai 14, 08:51:54, Richard Owlett wrote:
> 
> I had found "somewhere" a description of installing Grub2 to its own
> partition - I've mislaid the link.
> 
> The general sequence was:
>   1. Do a fairly typical install of Squeeze(6.0.5) to primary partition sda1
>      allowing installer to place grub on MBR.
>   2. Create a small primary partition (sda2) dedicated to grub.
>      (all test installs and swap on logical partitions)
>   3. Do grub-install /dev/sda2
>   4. Edit grub.cfg residing on sda2 to have menu appear as desired.
>   5. For each test configuration:
>        install to a logical partition without installing grub or lilo
>        reboot into install on sda1
>        run update-grub
>        copy and edit appropriate section under os-prober to the grub.cfg on
> sda2

On my laptop I always have at least two Debian installations, stable and 
sid. The grub in MBR always belongs to stable. sid's grub is installed 
in the first sector of the corresponding partition (using 
'dpkg-reconfigure grub-pc', so that updates will retain the setting).

The sid install is "chain-loaded" via following /etc/grub.d/40_custom

#!/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 "Debian Sid (unstable)" {
	configfile (hd0,msdos2)/boot/grub/grub.cfg
	#set root="(hd0,msdos2)"
	#chainload +1
}


As you can see, the actual chain-loading is disabled at the moment, 
since stable's grub can boot sid with it's config (this way I don't need 
to worry about kernel updates in sid), but as sid's grub might diverge 
from stable it might be necessary to activate it.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt

Attachment: signature.asc
Description: Digital signature


Reply to: