LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 05-21-2008, 02:04 AM   #1
accordionforever
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
"Alert! /dev/sda1 does not exist" when booting a new kernel


Please help! I'm new to kernel configuration and at my wit's end.

I compiled a new 2.6.22 kernel (without any patches) using make-kpkg, according to the instructions at http://technowizah.com/2005/12/debia...l-compile.html.

Installing the package worked without errors, but when I try to boot into the kernel, I get:

Alert! /dev/sda1 does not exist. Dropping to a shell!
Check your root = boot argument.
Check for missing modules or device files


my /proc/cmdline file says
root=/dev/sda1 ro

There are no sda devices listed in /dev.

When I boot into my original (2.6.18) kernel, it says that the filesystem is mounted on /dev/sda1, and /dev has 5 different sda listings (sda, sda1, sda5, sda6, sda2)

I tried editing my /boot/grub/menu.lst and changing the 2.6.22 entry to use sda1's /dev/disk/by-uuid uuid instead. Didn't work. At the point where the 2.6.22 kernel fails, /dev/disk doesn't have a by-uuid directory at all. (Its /dev/disk/by-id directory has only one entry- for my dvd drive.)

Can anyone tell me what I've done wrong here?

Thanks very much!
 
Old 05-21-2008, 04:13 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
post your /etc/fstab and your grub menu
 
Old 05-21-2008, 05:32 AM   #3
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
Certainly that the SATA controller driver is compiled as a module, and doesn't automatically loaded at boot. Is it in your initrd? Try to compile it not as a module. (I assume your using udev)
 
Old 05-21-2008, 09:25 AM   #4
accordionforever
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by whansard View Post
post your /etc/fstab and your grub menu
My /etc/fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda1 / reiserfs notail 0 1
/dev/sda6 /home/carly reiserfs defaults 0 2
/dev/sda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/card_sd1 /media/sd vfat rw,user,noauto 0 0

My /boot/grub/menu.lst:
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.6.24-1-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.24-1-amd64

title Debian GNU/Linux, kernel 2.6.24-1-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.24-1-amd64

title Debian GNU/Linux, kernel 2.6.22alsa2
root (hd0,0)
kernel /boot/vmlinuz-2.6.22alsa2 root=/dev/disk/by-uuid/b207fa26-21ce-4960-8c0a-a8b30442df18 ro
initrd /boot/initrd.img-2.6.22alsa2

title Debian GNU/Linux, kernel 2.6.22alsa2 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22alsa2 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.22alsa2

title Debian GNU/Linux, kernel 2.6.18-6-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-amd64 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.18-6-amd64

title Debian GNU/Linux, kernel 2.6.18-6-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-amd64 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.18-6-amd64

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 05-22-2008, 01:50 PM   #5
accordionforever
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jf.argentino View Post
Certainly that the SATA controller driver is compiled as a module, and doesn't automatically loaded at boot. Is it in your initrd? Try to compile it not as a module. (I assume your using udev)
That was it. Everything works now. Thanks!
 
Old 08-14-2008, 07:51 AM   #6
aixilin
LQ Newbie
 
Registered: Aug 2008
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by accordionforever View Post
That was it. Everything works now. Thanks!
Sorry,I have same problem, but I didn't get it.

How to install the SATA driver not as module???
 
Old 08-22-2008, 09:58 AM   #7
Cortexfr
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Hi,

I'm experiencing the exact same problem. But I couldn't find anything to check as a "SATA driver" in the kernel menuconfig. I'm trying to have kernel 2.6.26.3 to work but the problem appears on a 2.6.24 too. I use Debian.

So, the problem is that /dev/sdaXXX are not loaded when it tries to mount the root filesystem on my hard disk, which is sda3.

If anyone could explain how to achieve that, it would help many people for sure
 
Old 08-22-2008, 11:39 AM   #8
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,359

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Parts of "the kernel" can be set up as "resident" (it's always in memory, all the time), or as a "module" that must be loaded before it can be used. (Once loaded, it becomes "part of the kernel" until unloaded again.)

Many commercial Linux distros, in an effort to work on as many types of hardware as possible, use a "cheat" known as initrd which causes the boot-sequence to become two-stage. A minimal kernel gets loaded, and it loads the initrd, and the initrd can do things ... like doing hardware detection so that it can figure out on-the-fly what kernel modules actually need to be loaded. It's a cumbersome process, but the initrd also presents a very nice logo-picture and some animated graphics so that no one feels the need to "look behind the little curtain over there."

When you build the necessary device-drivers into the resident part of the kernel, that kernel immediately has the "smarts" that it needs to use that hardware... without detecting anything or loading anything.

On my system, I dispensed-with the initrd nonsense altogether: the drivers for permanently-attached hardware are all resident. Drivers and modules that I don't actually need don't actually exist. The system boots in less than 45 seconds including subsystem-initialization.
 
Old 08-23-2008, 04:21 AM   #9
aixilin
LQ Newbie
 
Registered: Aug 2008
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by Cortexfr View Post
Hi,

I'm experiencing the exact same problem. But I couldn't find anything to check as a "SATA driver" in the kernel menuconfig. I'm trying to have kernel 2.6.26.3 to work but the problem appears on a 2.6.24 too. I use Debian.

So, the problem is that /dev/sdaXXX are not loaded when it tries to mount the root filesystem on my hard disk, which is sda3.

If anyone could explain how to achieve that, it would help many people for sure
If the kernel version is newer than 2.6.18, you should find the driver's name are different in two config files, so you can not use old configure file and menuconfig directly. Before you menuconfig, you should change the driver's name from SATA_AIA_ to _AIA...I can not remeber datails . Debian website offer the config file for different kernel version ,you can look for..
 
Old 08-25-2008, 05:03 AM   #10
Cortexfr
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Thank you for your help. Finally, I got it to work by including the Intel Serial ATA drivers (in menuconfig, Device Drivers -> SATA controllers, kernel 2.6.24) - because I found out that my notebook was using an Intel SATA controller in "lspci -v".

Hope it can help other people who encounter this issue !
 
Old 12-16-2008, 06:50 AM   #11
ke1vintan
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by Cortexfr View Post
Thank you for your help. Finally, I got it to work by including the Intel Serial ATA drivers (in menuconfig, Device Drivers -> SATA controllers, kernel 2.6.24) - because I found out that my notebook was using an Intel SATA controller in "lspci -v".

Hope it can help other people who encounter this issue !
Hi... i am still a newbie in ubuntu, do you mind to show the step to do the above solution u mentioned? Thanks in advance.
 
Old 12-16-2008, 07:37 AM   #12
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Assuming that ubuntu is like most other distro's:
Run "make oldconfig". This will use your old kernel's settings and prompt you for new options. Then run "make menuconfig" and make other changes you want to make. This is where you may need to enable sata, but if your old kernel worked, your new one should work as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I switch the labels "/dev/sda1" with "/dev/sda3" vonst Linux - General 10 05-27-2006 10:48 PM
No longer able to mount CD: "/dev/hdc does not exist" Kropotkin Linux - Hardware 2 01-29-2006 05:40 PM
"/dev/sda1 is not a valid block device" used to be millionknives Linux - Hardware 6 12-13-2005 06:39 PM
ALERT! /dev/sda1 does not exist. - Installing on external HD nrbelex Linux - Software 5 11-17-2005 06:49 AM
another "device /dev/dsp can't be opened (device does not exist)" in DEBIAN, woody Kroppus Linux - Hardware 12 11-13-2003 12:23 PM


All times are GMT -5. The time now is 09:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration