[Top][All Lists]

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

install grub does nothing

From: Rustom Mody
Subject: install grub does nothing
Date: Fri, 22 Apr 2011 09:35:24 +0530


I have two disks

1. a 500G Sata disk with a working debian (/dev/sdb)
2. a 160G Ata onto which I want to replicate the debian (/dev/sda)

[If that works I can use these disks in different computers]

As far as I can see the replication has gone fine upto grub but grub
install wont work.

By replication I mean
a. copy out the root boot home etc partitions from sdb(500) to sda(160)
b. adjust the fstab in sda to be self contained
c. Install grub on sda
d. physically disconnent sdb and reboot (from sda)

ie on my working disk I have this entry in grub.cfg which boots my
working debian
menuentry "Debian 500" {
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd0,2)
        search --no-floppy --label --set Debian500G
        linux   /vmlinuz root=LABEL=Debian500G ro
        initrd  /initrd.img

I add an entry below which now boots the copied
menuentry "Debian 160 handedited" {
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd1,5)
        search --no-floppy --label --set Debian160D
        linux   /vmlinuz root=LABEL=Debian160D ro
        initrd  /initrd.img

FYI devices are like this
/dev/sdb2 Label Boot500G
/dev/sdb5 Label Debian500G
/dev/sda5 Label Boot160D
/dev/sda7 Label Debian160D

The partitions have been copied over from 500 to 160 in the obvious way.

Now the problem:
If the 500G (sdb) is connected the that grub works and I can boot to
the 160G disk's debian

If I disconnect the 500G, I get
No bootable device -- insert boot disk and press any key.

Ive tried
1. Booting into the 160(sda) (via the 500G working grub) and then
1.a dpkg-reconfigure grub-pc and select sda
1.b grub-install /dev/sda

2. Boot from ubuntu live usb
Mount root, boot, chroot and do the above

But none of it works: I keep getting
No bootable device...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]