 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

26th January 2010, 01:47 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14

|
|
|
Moving FC10 from SATA to PATA - UUID probs?
I'm trying to move an existing FC10 install (created by someone else) from a 160GB WD1600AAJS SATA disk to a 160GB WD1600AAJB PATA disk (cursed trend of horizontally mounting SATA connectors at the end of the motherboard means the latest rev mobo doesn't fit in our enclosure!).
I've used DD to copy the disk image from one to the other, but when attempting to boot, I get the following error:
Code:
Unable to access resume device (UUID=946f216f-0c24-4b02-a996-f42059970de7)
mount: error mounting /dev/root on /sysroot as ext3: no such file or directory
That particular UUID maps to sda2, which is the swap partition. Interestingly, both the SATA and PATA disk come up as /dev/sda on the motherboard.
I kind of grok that the UUIDs are substitutes for directly naming the disks, and that they're referred to in fstab, initrd-2.6.27.12-170.2.5.fc10.i686.img, and in /dev/disk/by-*
I'm guessing the problem is that the GUIDs (at least the one for swap) are no longer the same. How are they assigned to the partitions during boot?
I tried doing
Code:
swapoff -a
mkswap /dev/sda2
swapon -a
and put that new GUID in fstab and into initrd-* (using some steps I found elsewhere on how to gunzip/rezip it).
At that point, I get a kernel panic on boot
Code:
Kernel panic - not syncing: CFS: Unable to mount root fs on unknown-block(0,0)
So I'm guessing that the other UUUDs have changed as well and I need to update them. How would I figure out what they are?
I suppose I could change the references to /dev/sda*, but I didn't build this original image and I'm thinking whoever did had a good reason to go with UUIDs.
Or, I'm totally barking up the wrong tree and something else is wrong.
Any ideas?
|

26th January 2010, 04:25 AM
|
|
Registered User
|
|
Join Date: Jan 2006
Posts: 2,769

|
|
|
I don't know how the UUIDs are generated but they are easy to see with the "blkid" command.
|

26th January 2010, 05:34 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14

|
|
Quote:
Originally Posted by JEO
I don't know how the UUIDs are generated but they are easy to see with the "blkid" command.
|
Alas, that's based on the host OS' assignments. I can't actually boot into the new disk, so I can't see what UUIDs it's assigning. Good tool to know though, thanks!
|

26th January 2010, 05:47 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 2,008

|
|
Quote:
Originally Posted by StickyC
Alas, that's based on the host OS' assignments. I can't actually boot into the new disk, so I can't see what UUIDs it's assigning. Good tool to know though, thanks!
|
boot from a rescue cd (don't forget to "chroot /mnt/sysimage") and fix fstab by looking at blkid output, or even figure it out from "ls -l /dev/disk/by-uuid/"
you can go back to using labels or even just /dev/sdaX if you don't want to stick with uuid's in the new fstab.
all hard disks are sdXX now btw, ide, scsi and sata subsystems have been merged.
|

26th January 2010, 06:02 PM
|
|
Registered User
|
|
Join Date: Jan 2006
Posts: 2,769

|
|
|
Also there are live cds available that you can download and burn that boot up into the operating system without actually having to install it.
|

29th January 2010, 07:13 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14

|
|
I really appreciate the help so far, but I'm still stuck.
Booted the FC10 DVD in rescue mode and mounted /mnt/sysimage in chroot. The UUIDs listed in the blkid output matches what's in /etc/fstab and in the compressed /boot/initrd image's init file.
fstab:
Code:
#
# /etc/fstab
# Created by anaconda on Thu Feb 5 23:23:03 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=332e6541-f1fa-4335-a8c1-4db345c230c3 / ext3 defaults,noatime 1 1
UUID=e16662ac-6f98-47bb-919b-e73dfff37f4c /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=946f216f-0c24-4b02-a996-f42059970de7 swap swap defaults 0 0
blkid:
Code:
/dev/sda1: LABEL="/boot" UUID="e16662ac-6f98-47bb-919b-e73dfff37f4c" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda2: TYPE="swap" LABEL="SWAP-sda2" UUID="946f216f-0c24-4b02-a996-f42059970de7"
/dev/sda3: LABEL="/" UUID="332e6541-f1fa-4335-a8c1-4db345c230c3" TYPE="ext3" SEC_TYPE="ext2"
/dev/sr0: LABEL="Fedora 10 x86_64 DVD" TYPE="iso9660"
/dev/loop0: TYPE="squashfs"
/dev/sdb1: SEC_TYPE="msdos" LABEL="KINGSTON" UUID="C2D3-A35F" TYPE="vfat"
contents of init in initrd-2.6.27.12-170.2.5.fc10.i686.img:
Code:
#!/bin/nash
mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/fb c 29 0
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
/lib/udev/console_init tty0
daemonize --ignore-missing /bin/plymouthd
plymouth --show-splash
echo Setting up hotplug.
hotplug
echo Creating block device nodes.
mkblkdevs
echo Creating character device nodes.
mkchardevs
echo "Loading sata_nv module"
modprobe -q sata_nv
echo "Loading pata_acpi module"
modprobe -q pata_acpi
echo "Loading ata_generic module"
modprobe -q ata_generic
modprobe scsi_wait_scan
rmmod scsi_wait_scan
mkblkdevs
resume UUID=946f216f-0c24-4b02-a996-f42059970de7
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro UUID=332e6541-f1fa-4335-a8c1-4db345c230c3
echo Mounting root filesystem.
mount /sysroot
cond -ne 0 plymouth --hide-splash
echo Setting up other filesystems.
setuproot
loadpolicy
plymouth --newroot=/sysroot
echo Switching to new root and running init.
switchroot
echo Booting has failed.
sleep -1
grub/menu.lst:
Code:
# 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/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=0
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.12-170.2.5.fc10.i686)
root (hd0,0)
kernel /vmlinuz-2.6.27.12-170.2.5.fc10.i686 ro root=UUID=332e6541-f1fa-4335-a8c1-4db345c230c3 rhgb quiet selinux=0
initrd /initrd-2.6.27.12-170.2.5.fc10.i686.img
Booted an Ubuntu live CD and got the output of ls -l /dev/disk/by-uuid:
Code:
total 0
lrwxrwxrwx 1 root root 10 2010-01-29 11:04 332e6541-f1fa-4335-a8c1-4db345c230c3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2010-01-29 11:04 946f216f-0c24-4b02-a996-f42059970de7 -> ../../sda2
lrwxrwxrwx 1 root root 10 2010-01-29 11:07 C2D3-A35F -> ../../sdb1
lrwxrwxrwx 1 root root 10 2010-01-29 11:04 e16662ac-6f98-47bb-919b-e73dfff37f4c -> ../../sda1
Everything looks to match. The SATA original of the drive boots fine, the PATA dd'd clone does not. I'm not quite sure what I'm missing. Most of my Google searches are turning up results that revolve around either a kernel update or cloning to SCSI/RAID systems. In this case, the drives are identical except for the interface and no other changes have been made.
Any other places I should be looking?
|

29th January 2010, 08:08 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 2,008

|
|
|
no idea really, definitely seems to be a swap problem though.
i assume you removed the sata drive when you installed the pata - so its not getting drives muddled up?
have you tried running mkinitrd?
you don't have some weird ide controller or something do you?
|

29th January 2010, 08:58 PM
|
|
Registered User
|
|
Join Date: Jan 2006
Posts: 2,769

|
|
|
I agree with sej, with Fedora 10 you should run mkinitrd again to recreate the initrd file because you are booting off of a different controller and the kernel module for that pata controller is probably different than the one for the sata controller. mkinitrd makes the decision of what kernel modules to include when you run it on the target system. For running it on the original system, if you can determine what module you need on the target then you can include that with the mkinitrd --preload or --with options, see mkinitrd --help for the list of options.
|

29th January 2010, 09:03 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14

|
|
Quote:
Originally Posted by sej7278
no idea really, definitely seems to be a swap problem though.
i assume you removed the sata drive when you installed the pata - so its not getting drives muddled up?
|
Correct - one drive at a time.
Quote:
Originally Posted by sej7278
have you tried running mkinitrd?
|
I've not tried that - is there anything special I should be taking into consideration with it, or will the man page guidance be enough?
Quote:
Originally Posted by sej7278
you don't have some weird ide controller or something do you?
|
Don't think so - both controllers are on the motherboard - MSI's base model K9N6PGM2.
Would there be any difference between doing a full dd if=/dev/sda of=/dev/sdb versus, say, using gparted to copy by-partition?
|

5th February 2010, 05:27 PM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14

|
|
|
Just to follow up - The solution was to boot from a rescue CD, chroot /mnt/sysimage, and run mkinitrd. It took some thrashing because even with -v, mkinitrd fails silently if you don't give it the right command line arguments for the kernel source.
Thanks all for the help!
|

6th February 2010, 10:30 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 2,008

|
|
Quote:
Originally Posted by StickyC
Just to follow up - The solution was to boot from a rescue CD, chroot /mnt/sysimage, and run mkinitrd. It took some thrashing because even with -v, mkinitrd fails silently if you don't give it the right command line arguments for the kernel source.
|
mwahaha i told you so lol!
glad you got it fixed, and yes, every time i run mkinitrd i fire up google first, i can never remember the syntax, i must write it down somewhere as the manpages are useless.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 07:38 (Monday, 20-05-2013)
|
|
 |
 |
 |
 |
|
|