# [SOLVED] block device /dev/sda2 is not a valid root device

## silent_Walker

So a couple of days ago we had this bad electrical storm and blew my breaker, and also my HDD. SO after getting a new one I installed Gentoo on it.  But I am now getting 

!! Block device /dev/sda2 is not a valid root device...

!! Could not find the root block device in .

my fstab is 

/dev/sda1  /boot     ext2  defaults,noatime 

/dev/sda2  /      reiser defaults,noatime 

proc       /proc     proc   defaults 

shm        /dev/shm  tmpfs  defaults,nodev,nosuid,noexec

I think it might be because I unpicked the SCSI ( or something) from the Kernel

----------

## NeddySeagoon

silent_Walker,

```
!! Block device /dev/sda2 is not a valid root device... 

!! Could not find the root block device in . 
```

Between the word "in" and the full stop should be a list of block devices the kernel found. You have none.

This tells that one or more kernel options for reading your hard drive are either off or set as modules, or possibly the storm fried your HDD controller too.

Please post your lspci output.

Since root has not been mounted, /etc/fstab has not yet been read.

----------

## silent_Walker

And.... By popular demand!

lspci :

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS880 Host Bridge

00:01.0 PCI bridge: Toshiba America Info Systems Devices 9602

00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 0)

00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)

00:07.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 3)

00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA controller [AHCI mode]

00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller

00:12.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB  OHCI1 Controller

00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller

00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller

00:13.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller

00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0SB7x0/SB8x0/SB9x0 USB EHCI Controller

00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 3c)

00:14.2 Audio Device: Advanced Micro Devices [AMD] nee ATI SBx00 Azaila (Intel HDA)

00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller

00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge

00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Misc. Control

00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control

01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS880M [Mobility Radeon HD 4200 Series]

oe:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)

14:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

----------

## NeddySeagoon

silent_Walker,

```
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA controller [AHCI mode] 
```

Thats youre hsrd drive controller, and its in AHCI mode too, which is good.

Under

```
SCSI device support
```

you need 

```
  │ │     < > RAID Transport Class                                                    │ │  

  │ │     -*- SCSI device support                                                     │ │  

  │ │     < > SCSI target support                                                     │ │  

  │ │     [*] legacy /proc/scsi/ support                                              │ │  

  │ │         *** SCSI support type (disk, tape, CD-ROM) ***                          │ │  

  │ │     <*> SCSI disk support                                                       │ │  

  │ │     < > SCSI tape support                                                       │ │  

  │ │     < > SCSI OnStream SC-x0 tape support                                        │ │  

  │ │     <*> SCSI CDROM support                                                      │ │  

  │ │     [ ]   Enable vendor-specific extensions (for SCSI CDROM)                    │ │  

  │ │     <*> SCSI generic support                                                    │ │  

  │ │     < > SCSI media changer support                                              │ │  

  │ │     [*] Probe all LUNs on each SCSI device
```

, OK, they are not all essential to boot but you will want most of those options on a laptop, so may as well make them built in.

Under 

```
<*> Serial ATA and Parallel ATA drivers  --->
```

you need

```
  │ │     --- Serial ATA and Parallel ATA drivers                                     │ │  

  │ │     [ ]   Verbose ATA error reporting                                           │ │  

  │ │     [*]   ATA ACPI Support                                                      │ │  

  │ │     [ ]   SATA Port Multiplier support                                          │ │  

  │ │           *** Controllers with non-SFF native interface ***                     │ │  

  │ │     <*>   AHCI SATA support                                                     │ │  

  │ │     < >   Platform AHCI SATA support
```

Note, you may need  Platform AHCI SATA support as <*> too.  I have two systems with the same chipset as you, one needs it, one doesn't.

That will get your HDD chipset seen by the kernel, after you rebuild and reinstall the kernel, then boot into it.

----------

## silent_Walker

Thanks for the visual man.  Kernel is compiling now.

----------

## silent_Walker

Kernel compiled and rebooted, I get to lilo loading gentoo then a constant restart

----------

## silent_Walker

lol nvm i set noatime after /boot.

Now i still get /dev/sda2 is not a valid root device

----------

## NeddySeagoon

silent_Walker,

lilo ????

Did you run /sbin/lilo to generate a new lilo block list, so your new kernel is loaded ?

----------

## silent_Walker

Yep, and still the same result

----------

## silent_Walker

Looking at your graphic, your ticks are * while in my kernel it only will be selected as a module.

Can that be a problem?

----------

## Jaglover

Yes this is the problem. Everything required for boot has to be * - unless you build initrd.

----------

## silent_Walker

So I just have to boot from initrd?

----------

## Jaglover

Building it into kernel is easier way, go with *.

----------

## NeddySeagoon

silent_Walker,

You cannot load kernel modules from /lib/modules, which is on your root filesyatem until the root filesystem is mounted.

If the modules you need to mount root are stored on the root filesystem, you can't load them to be ab le to mount root, since you need to mout root to read them.

If that looks a bit circular, it is.  You break the circle by either having an initrd or by building the code into your kernel. The latter is far easier.

----------

## silent_Walker

AHCI SATA support  says "This feature depends on another which has been configured as a module.  As a result, this feature will be built as a module."

What is AHCI SATA support  tied to?

----------

## NeddySeagoon

silent_Walker,

Its tied to the top level SATA menu. 

```
<*> Serial ATA and Parallel ATA drivers  --->
```

That item must not be <M> or everything in the menu irem can only be <M> or off.

----------

## silent_Walker

^ fixed that part  :Very Happy: 

----------

## silent_Walker

Compiling the kernel!  ^.^ So excited  :Razz: 

----------

## silent_Walker

One last problem to point out now, 

Lilo 22.8 Loading gentooEBDA is big; kernel setup stack overlaps Lilo second stage

----------

## NeddySeagoon

silent_Walker,

I suspect your kernel is full of junk.

Why not use grub as your boot loader?

----------

## Jaglover

It may also be there is something odd in lilo.conf. Can you post it?

----------

## silent_Walker

Fixed that part and it is now booting.

Thanks NeddySeagoon and Jaglover for your support  :Very Happy: 

----------

## silent_Walker

Jaglover 

Here is my fixed LILO

boot=/dev/sda 

prompt 

timeout=50 

default=gentoo 

image=/boot/kernel-genkernel-x86_64-3.8.8-gentoo 

   label=gentoo 

   read-only 

   root=/dev/sda2

   append="real_root=/dev/sda2" 

   initrd=/boot/initramfs-genkernel-x86_64-3.8.8-gentoo 

and my old one 

boot=/dev/sda1 

prompt 

timeout=50 

default=gentoo 

image=/boot/kernel-genkernel-x86_64-3.8.8-gentoo 

   label=gentoo 

   read-only 

   root=/dev/sda2 

   append="real_root=/dev/sda2" 

   initrd=/boot/initramfs-genkernel-x86_64-3.8.8-gentoo

----------

## Jaglover

Glad you got it sorted.  :Smile: 

----------

