LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-12-2008, 10:40 AM   #1
TuPari
LQ Newbie
 
Registered: Oct 2008
Posts: 10

Rep: Reputation: 0
Question switchroot problem with Fedora 8


Because my old hard drive was failing, I installed a new one and installed Fedora 9 on it. After a lot of problems I decided to go back to Fedora 8. I copied my old installation with tar, changed the fstab, and added entries in my new grub.conf to point to my Fedora 8 installation.

My grub.conf looks like this:

title Fedora (2.6.26.3-14.fc8)
root (hd1,2)
kernel /boot/vmlinuz-2.6.26.3-14.fc8 ro root=LABEL=fc8 rhgb quiet usbcore.autosuspend=-1
initrd /boot/initrd-2.6.26.3-14.fc8.img
title Fedora (2.6.25.14-69.fc8)
root (hd1,2)
kernel /boot/vmlinuz-2.6.25.14-69.fc8 ro root=LABEL=fc8 rhgb quiet usbcore.autosuspend=-1
initrd /boot/initrd-2.6.25.14-69.fc8.img
title Fedora (2.6.26.5-45.fc9.x86_64)
root (hd1,0)
kernel /boot/vmlinuz-2.6.26.5-45.fc9.x86_64 ro root=UUID=e72c6d16-9923-4532-92d3-f6c4a1fe026b rhgb quiet
initrd /boot/initrd-2.6.26.5-45.fc9.x86_64.img

The problem is that Fedora 8 won't boot. When I try I get:

mount: could not find filesystem '/dev/root'
setuproot: mounting /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
hub 1-0:1.0: over-current change on port 5
hub 1-0:1.0: over-current change on port 6

and then nothing else happens. I've tried doing a fresh mkinitrd and doing "mknod /dev/root b 8 3" but neither helped any. Does anybody have any idea what's going on here?
 
Old 10-12-2008, 02:18 PM   #2
drchuck
Member
 
Registered: May 2007
Posts: 61

Rep: Reputation: 17
From your new grub.conf, it looks like you moved the root of Fedora 8 to the 3rd partition of your second drive (hd1,2). Is there another drive in the system, which would be detected first as hd0? You may need to fix /boot/grub/device.map by hand.

Also, could you explain the title of your post? Did you boot from the rescue disk, attempt to chroot, and have a problem?

Last edited by drchuck; 10-12-2008 at 02:21 PM.
 
Old 10-12-2008, 03:34 PM   #3
TuPari
LQ Newbie
 
Registered: Oct 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by drchuck View Post
From your new grub.conf, it looks like you moved the root of Fedora 8 to the 3rd partition of your second drive (hd1,2).
Yes, both 9 and 8 are on the same drive now.
Quote:
Originally Posted by drchuck View Post
Is there another drive in the system, which would be detected first as hd0? You may need to fix /boot/grub/device.map by hand.
Yes, the device.map (which resides on my Fedora 9 partition) is correct.
Quote:
Originally Posted by drchuck View Post
Also, could you explain the title of your post? Did you boot from the rescue disk, attempt to chroot, and have a problem?
I can boot to Fedora 9 and chroot (which is how I did the mkinitrd and mknod) but when booting the system when I select the Fedora 8 entry from the grub boot menu I get those errors.
 
Old 10-12-2008, 04:05 PM   #4
drchuck
Member
 
Registered: May 2007
Posts: 61

Rep: Reputation: 17
Somehow it isn't finding your root partition. Check and see if the fedora 8 root partition is correctly labeled as "fc8", using fsck. In any case, you could change root=LABEL=fc8 to root=/dev/sdb3 or hdb3, as the case may be, and try booting again. I would try removing the LABEL reference in fstab as well.

Last edited by drchuck; 10-12-2008 at 04:07 PM.
 
Old 10-12-2008, 08:39 PM   #5
TuPari
LQ Newbie
 
Registered: Oct 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by drchuck View Post
Somehow it isn't finding your root partition. Check and see if the fedora 8 root partition is correctly labeled as "fc8", using fsck. In any case, you could change root=LABEL=fc8 to root=/dev/sdb3 or hdb3, as the case may be, and try booting again. I would try removing the LABEL reference in fstab as well.
[root@jks-desktop /home/jks]# e2label /dev/sda3
fc8

fsck reports no problems.
 
Old 10-13-2008, 10:11 AM   #6
TuPari
LQ Newbie
 
Registered: Oct 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by drchuck View Post
Somehow it isn't finding your root partition. Check and see if the fedora 8 root partition is correctly labeled as "fc8", using fsck. In any case, you could change root=LABEL=fc8 to root=/dev/sdb3 or hdb3, as the case may be, and try booting again. I would try removing the LABEL reference in fstab as well.
I tried passing root=/dev/sda3 to the kernel but that didn't work either.
 
Old 11-08-2008, 01:22 PM   #7
Q..
Member
 
Registered: Jul 2007
Posts: 54

Rep: Reputation: Disabled
Quote:
I can boot to Fedora 9 and chroot (which is how I did the mkinitrd and mknod) but when booting the system when I select the Fedora 8 entry from the grub boot menu I get those errors.
If you can chroot into it from a working system then it is odd that mkinitrd is not doing it right. How exactly are you doing that? I do this:

boot up linux livecd or separete partition

mount partition to /mnt
cd /mnt
mount -t proc proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys

chroot /mnt /bin/bash

mkinitrd ...

Either way, it could also be some mismatch in /etc/modprobe.conf
Or it can be the case even after success with chroot/mkinitrd once you try to boot a new mkinitrd created on that initrd restored system, like for a new kernel.

If you compare the modprobe.conf of a system that can mkinitrd correctly for the give drive, compare it against your old one, particularly the 'alias scsi_hostadapter' parts. For instance one drive may need ata_generic while another atiixp. Once that is sorted out, you should be able to rebuild initrd on that system any time. At least that's what I've done before.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 8 boot failure. "switchroot: mount failed..." hacker supreme Fedora 10 09-25-2010 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration