Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem migrating from SCSI drives to SATA drives
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
subdriver
n00b
n00b


Joined: 23 Mar 2010
Posts: 29

PostPosted: Mon Feb 23, 2015 11:40 pm    Post subject: Problem migrating from SCSI drives to SATA drives Reply with quote

I have a fairly old PC running Gentoo with a 2.6.38 kernel. The machine was built on a stack of UW160 SCSI drives and an Adaptec 39160 controller and works fine. However, the drives are now rather on the small size so I have installed a SATA controller and a pair of SATA drives. The controller is based on the Sil3512 controller, so I've re-compiled the kernel to include support for sata_sil. That all works well, and I've partitioned the new drives and copied across the filesystems.
After doing this, it wouldn't boot, sticking at the grub> prompt resisting all attempts to boot it. I decided to clean things up, so I booted a CD running a 2.6.38 kernel and chrooted into my new disks, spent some time emerging newer versions of packages so I could get a more up-to-date portage installed, re-installed the grub bootloader and generated an initramfs; the initramfs was built without specifying any modules as the crucial drivers are in the kernel.
Now when I boot, I get a message stating "Could not find the root block device in ." I opted to go to the shell where I ran mount with the following result (only the relevant line shown) /dev/sda2 on /newroot type ext3 (ro)

My menu.lst file contains these entries for the kernel I'm using:

kernel /vmlinuz-2.6.38-gentoo root=/dev/sda2 init=/bin/bash rootfstype=ext3
initrd /initramfs-genkernel-x86-2.6.38-gentoo.

The /boot partition is sda1 and the root partition is sda2.
I don't understand why it's reporting it can't find the root block device, then successfully mounts it on /newroot (I've checked and the entire filesystem is as I expect it); any ideas what I could be missing here?
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 623

PostPosted: Tue Feb 24, 2015 2:27 am    Post subject: Reply with quote

Since the kernel boots and you can get into a shell, with the new filesystem mounted on /newroot, I would suggest chroot-ing into the new filesystem and doing the grub2 install as if you are following the handbook at that point:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader

HTH
Back to top
View user's profile Send private message
subdriver
n00b
n00b


Joined: 23 Mar 2010
Posts: 29

PostPosted: Tue Feb 24, 2015 11:27 am    Post subject: Reply with quote

I don't think the kernel is booting, the environment is a busybox shell, so the initramfs has started but not started the kernel
Edit:I should have said an ash shell with the busybox tool kit.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7006

PostPosted: Tue Feb 24, 2015 1:27 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-7677328.html#7677328
Back to top
View user's profile Send private message
s0be
Apprentice
Apprentice


Joined: 23 Nov 2002
Posts: 239

PostPosted: Tue Feb 24, 2015 5:42 pm    Post subject: Reply with quote

subdriver wrote:
I don't think the kernel is booting, the environment is a busybox shell, so the initramfs has started but not started the kernel
Edit:I should have said an ash shell with the busybox tool kit.


To help you understand what goes on:

1. Bios boots bootloader after basic hardware configuration
2. Bootloader (probably grub) boots kernel
3. Kernel further initializes hardware
4. (optional) Kernel unpacks initrd/initramfs into memory
a initrd/initramfs sets up root partition (configures raid or unencrypts partition, etc)
b Initrd/initramfs uses switch_root or pivot_root to transfer to on disc partition
5. Kernel or Initrd starts /init(or whatever init is passed on the kernel command line) in the root partition

The kernel is definitely booting if you're getting to a shell in a busybox environment. It's just after that point (it's probably not finding the correct root partition) that the wheels are coming off the track.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42847
Location: 56N 3W

PostPosted: Tue Feb 24, 2015 7:22 pm    Post subject: Reply with quote

subdriver,

This message is important for what it does not say.
Code:
"Could not find the root block device in ."

Between the word "in" and the period should be a list of all the block devices the kernel can see.
Here the list is empty, which means "none at all".

In turn, this points the finger at your kernel. Something needed to see your HDDs is missing.

For more help, please post the output of lspci --nn and put your kernel config file onto a pastebin site. Wgetpaste is your friend.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
subdriver
n00b
n00b


Joined: 23 Mar 2010
Posts: 29

PostPosted: Tue Feb 24, 2015 11:32 pm    Post subject: Reply with quote

Once I understood that the kernel was booting, I looked for other reasons and realised that /bin wasn't mounting.
So, I looked at what I'd done when I moved the filesystem across, and realised that I had created a separate partition for /bin :oops:
So, I mounted up the bin partition on a temporary mountpoint, did mkdir /bin, copied all of the files across to /bin, tidied up and rebooted and it works! Just a few niggles with the mountpoints to sort out, but it seems to be all good
Thanks for the assistance.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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