I've been trying to build a very customized debian for quite a while and doing so obviously involves manually compiling your own kernel. So I fetch the kernel (vanilla sources), stable version, unpack it and create the necessary symlink. After checking the right options for my ATI Radeon X1200 graphics card which really sucks ass, I compile the kernel, copy the bzImage to /boot, configure grub and reboot. From grub, I select my new kernel and while I was thinking of what next to fetch for my system, I am greeted with the following message.

VFS: Cannot open root device “sda1” or unknown-block (0,0) Please append a correct “root=” boot option; here are the available options
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
0104 8192 ram4 (driver?)
0105 8192 ram5 (driver?)
0106 8192 ram6 (driver?)
0107 8192 ram7 (driver?)
0108 8192 ram8 (driver?)
0109 8192 ram9 (driver?)
010a 8192 ram10 (driver?)
010b 8192 ram11 (driver?)
010c 8192 ram12 (driver?)
010d 8192 ram13 (driver?)
010e 8192 ram14 (driver?)
010f 8192 ram15 (driver?)
Kernel panic – not syncing : VFS: Unable to mount root fs on unkown-block (0,0

Lo! The infamous kernel panic. I encountered the same problem while working on one of the college servers which was to be set up for being the new gateway. After compiling the kernel for Iptables support and rebooting into it, I got the same error, only that the available options were different. It showed the only hda device on the system that is, the CD-ROM drive.

Now after looking into a lot of forums, I decided there wasn't any clear cut solution provided on how to solve the problem. Unless you really DID append an incorrect “root=” option, the problem lies in the fact that your kernel is not able to recognize your SATA device (sda). Chances are, it's been compiled for IDE support.

The solution? Compile your kernel for SATA support.

$: cd /usr/src/linux
$: make menuconfig

Device drivers--->
SCSI device support--->

SCSI target support
[*] legacy /proc/scsi/ support
*** SCSI support type (disk, tape, CD-ROM) ***
SCSI disk support
SCSI CDROM support
[*] SCSI low-level drivers --->

ACARD SCSI support
Adaptec AIC7xxx Fast -> U160 support (New Driver)
(32) Maximum number of TCQ commands per device
(5000) Initial bus reset delay in milli-seconds
[*] Compile in Debugging Code
(0) Debug code enable mask (2047 for all debugging)
[*] Decode registers during diagnostics
Adaptec AIC7xxx support (old driver)
Adaptec AIC79xx U320 support
(32) Maximum number of TCQ commands per device
(4000) Initial bus reset delay in milli-seconds
(0) Debug code enable mask (16383 for all debugging)
The options under SCSI low level drivers depend on your device. These are the options that I'd set according to my hardware. If you're not able to figure out what the right options are, select everything! As far as the gateway was concerned, I'd selected almost everything which looked sensible enough.


$: make clean && make && make modules_install
$: cp arch/x86/boot/bzImage /boot/your-kernel-version

The last step would be to update grub.
$: vi /boot/grub/menu.lst

title Your Linux
root (hd0,0)
kernel /boot/your-kernel-version root=/dev/sda1

Hope this little write up proves helpful. Cheers. Feel free to post a comment if you have any problems.