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

Re: Wheezy: making a bootable HD with Grub



Ldten K a écrit :
> 
> As I understand it, "update-grub" runs "grub-mkconfig -o /boot/grub/grub.cfg". I think it will simply update my existing and working grub config file at my old /dev/sda drive. Actually, after I ran "grub-install" I copied all files from /dev/sda1 boot partition to /dev/sdb1.

grub-install /dev/sdb is a bit misleading : it installs only the first
stage on /dev/sdb. The rest is always installed in /boot/grub of the
current system, unless you specify otherwise with --boot-directory.

If os-prober is installed, by default update-grub or grub-mkconfig
should find the system on /dev/sdb and add an entry in the boot menu. If
it does not, you can add the entry by hand in /etc/boot/grub.cfg.
Then you reboot, select the entry to boot the system on /dev/sdb and run
grub-install /dev/sdb (or better : dpkg-reconfigure grub-pc) and
update-grub.

The other way is to chroot into the new system from the old. It involves
mounting at least /boot, /dev/ (bind mount), /sys and /proc on the new
root before running chroot.


Reply to: