LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to boot an old install? (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-boot-an-old-install-621464/)

jborn 02-15-2008 05:48 PM

Trying to boot an old install?
 
Hi,

I had a FC6 install across two hard drives. I added 1 drive and installed FC8 on that. It defaults to booting this drive via GRUB (I think that is the boot loader) which is correct for long term, but for short term I would like to add the other FC6 boot. How do I do that?

Here is the output of fdisk -l

fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003f91c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1580 12586927+ 83 Linux
/dev/sda3 1581 1841 2096482+ 82 Linux swap / Solaris
/dev/sda4 1842 38913 297780840 5 Extended
/dev/sda5 1842 38913 297780808+ 83 Linux

Disk /dev/sdb: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a4bdc

Device Boot Start End Blocks Id System
/dev/sdb1 1 20023 160834716 83 Linux

Disk /dev/sdc: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000020e2

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 104391 83 Linux
/dev/sdc2 14 1580 12586927+ 83 Linux
/dev/sdc3 1581 1841 2096482+ 82 Linux swap / Solaris
/dev/sdc4 1842 36481 278245800 5 Extended
/dev/sdc5 1842 36481 278245768+ 83 Linux

Disk /dev/dm-0: 449.5 GB, 449562279936 bytes
255 heads, 63 sectors/track, 54656 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

and this is the contents of grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.8-63.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.23.8-63.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.23.8-63.fc8.img

jschiwal 02-15-2008 07:09 PM

When you boot up, instead of selecting a menu option, back up into the grub shell and manually search for the old kernel and initrd files. Starting with "kernel (hd2," and pressing the tab key would be a good start. After the kernel line, do the same for an "initrd (hd" line. A nice feature of grub is using autocompletion. After locating these files, write the lines down and then enter the "boot" command and see if the old system still boots up. If you are missing a partition that was on another disk you may need to edit the old /etc/fstab entry, commenting out the entry.

If you get it working, use the kernel & initrd grub lines you used and add them to a new entry in /boot/grub/menu.lst.

jay73 02-15-2008 07:14 PM

I would simply copy the FC6 entry from the FC6 /boot/grub/menu.lst to the newer one. However, a conflict may result if both systems use the same partition labels. In that case, you should edit the /etc/fstab and /boot/grub/menu.lst files of one system to use device names (for example, /dev/sda3 instead of label=/), updated labels or any other method that would identify partitions in an unambiguous way .

jborn 02-16-2008 05:24 PM

I updated the menu.lst to add the second menu item. When I selected it the error message was something list file not found..

Exact error message:

Filesystem type unknown, partition type 0x83

Error 17: Cannot mount selected partition.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.8-63.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.23.8-63.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.23.8-63.fc8.img
title Fedora Core (2.6.22.14-72.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sdc1 rhgb quiet
initrd /initrd-2.6.22.14-72.fc6.img


Should the line root (hd0,0) be root (hd2,0) or root (hd1,0) to specify this is a different hard drive?

Thanks for all the pointers.

jborn 02-16-2008 07:28 PM

It ended up being root (hd1,0) but then everything was all messed up with all the hard drive devices being different. I'm going to try a different route and try to rebuild the lvm in fc8 and then mount that.. copy the data off and never go back to lvm.. nothing wrong with lvm, just to much for a linux newbie like me.

jay73 02-16-2008 07:31 PM

Well, yes, but it depends on how your disks are ordered. But if you know that your new drive is (hd0,0), then you know that you'll need (hd0,1) or (hd0,2) for the FC6 drive. You may also need to check whether the FC6 drive is still sda or whether it is now something else.


All times are GMT -5. The time now is 07:37 PM.