Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Problems migrating from HDD to SDD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Sycadellicman
n00b
n00b


Joined: 18 Jun 2010
Posts: 6

PostPosted: Mon Dec 27, 2010 12:00 am    Post subject: [SOLVED] Problems migrating from HDD to SDD Reply with quote

I am trying to migrate my root and boot partitions from an old HDD to a SSD. I copied the file structure over successfully using rsync and I installed grub onto the SSD. Grub works perfectly on the SSD and the kernel loads without error but init is never started. It just hangs after the kernel loads and does nothing.

The device structure is as follows:
/dev/sda - SSD (sda1 = ext2 boot partition, sda2 = ext4 root partition)
/dev/sdb - old HDD (sdb1 = ext2 boot partition, sdb3 = xfs root partiton)

fstab for SSD:
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda2 / ext4 noatime 0 1

grub.conf on SSD:
title Gentoo Linux 2.6.34-r12
root (hd0,0)
kernel /boot/2.6.34-gentoo-r12 root=/dev/sda2 rootfstype=ext4

Seems to get rid of bug talked about in in here: https://bugs.gentoo.org/show_bug.cgi?id=221245
May be the cause of my frustrations?

device.map on SSD:
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb

rsync command I used to migrate...
$ rsync -xHASavz / /mnt/ssd/

I have been hacking away at this system all day to no avail. Any help or suggestions from you would be greatly appreciated! I can give you any additional information; just ask.


Last edited by Sycadellicman on Wed Dec 29, 2010 4:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Tue Dec 28, 2010 1:18 am    Post subject: Reply with quote

Does it work when you boot with 'init=/bin/bash' as additional kernel argument?
Back to top
View user's profile Send private message
Sycadellicman
n00b
n00b


Joined: 18 Jun 2010
Posts: 6

PostPosted: Tue Dec 28, 2010 2:39 am    Post subject: Reply with quote

Interesting. When I add init=/bin/bash as a kernel argument, it will boot straight into a shell and I can view the file system.

Also, I should note that the kernel is printing:
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:2.

This may not be the problem as my laptop prints this as well but it is the only thing I can find that pertains to the root partition.

Do you have any idea as to what could be causing the problem?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Tue Dec 28, 2010 2:49 am    Post subject: Reply with quote

Well, it means that the kernel finishes loading and mounts the filesystem correctly, but init somehow doesn't take over from what you said.
Back to top
View user's profile Send private message
tkf
n00b
n00b


Joined: 23 May 2006
Posts: 18
Location: Cochabamba, Bolivia

PostPosted: Tue Dec 28, 2010 4:37 am    Post subject: Reply with quote

Maybe root somehow ended up lacking execution rights on init? Though I am sure the kernel panics with a very clear message on such cases.
Please check with ls -l /sbin/init
Back to top
View user's profile Send private message
Sycadellicman
n00b
n00b


Joined: 18 Jun 2010
Posts: 6

PostPosted: Wed Dec 29, 2010 4:51 am    Post subject: Reply with quote

It appears that the options: CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT were not set in my custom kernel. My original root partition booted because the contents of /dev were statically set (Still not sure why this was the case. I thought they were being mounted dynamically via udev until I booted into a livecd and saw that they were not). rsync did not copy /dev/* because they are in fact special files.

Such a simple fix hah. At least I learned several new things about the boot process.

Thanks for all your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum