Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev/hda missing [SOLVED]
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
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sat Mar 20, 2010 6:03 am    Post subject: /dev/hda missing [SOLVED] Reply with quote

Hi

I have something very strange

When my computer boot at the boot time it's detect everything, but when I check:
Code:
# ls -l /dev/h*
ls: cannot access /dev/h*: No such file or directory

I'm not able to mount my boot partition:
Code:
# mount /boot
mount: special device /dev/hda1 does not exist

I have a disk on /dev/hda but I don't see it!

And if I check:
Code:
# ls -l /sys/block/hda/
total 0
-r--r--r-- 1 root root 4096 Mar 20 01:56 alignment_offset
lrwxrwxrwx 1 root root    0 Mar 20 01:56 bdi -> ../../class/bdi/3:0
-r--r--r-- 1 root root 4096 Mar 20 01:56 capability
-r--r--r-- 1 root root 4096 Mar 20 01:56 dev
lrwxrwxrwx 1 root root    0 Mar 20 01:56 device -> ../../devices/pci0000:00/0000:00:0f.1/ide0/0.0
-r--r--r-- 1 root root 4096 Mar 20 01:56 ext_range
drwxr-xr-x 4 root root    0 Mar 20 01:56 hda1
drwxr-xr-x 4 root root    0 Mar 20 01:56 hda2
drwxr-xr-x 4 root root    0 Mar 20 01:56 hda3
drwxr-xr-x 2 root root    0 Mar 20 01:56 holders
-r--r--r-- 1 root root 4096 Mar 20 01:56 inflight
drwxr-xr-x 2 root root    0 Mar 20 01:56 power
drwxr-xr-x 3 root root    0 Mar 20 01:56 queue
-r--r--r-- 1 root root 4096 Mar 20 01:56 range
-r--r--r-- 1 root root 4096 Mar 20 01:56 removable
-r--r--r-- 1 root root 4096 Mar 20 01:56 ro
-r--r--r-- 1 root root 4096 Mar 20 01:56 size
drwxr-xr-x 2 root root    0 Mar 20 01:56 slaves
-r--r--r-- 1 root root 4096 Mar 20 01:56 stat
lrwxrwxrwx 1 root root    0 Mar 20 01:56 subsystem -> ../../block
-rw-r--r-- 1 root root 4096 Mar 20 01:56 uevent

The disk exist! For sure Linux is running on it! :)
When I rebuild udev it's told me to disable CONFIG_IDE but I cannot mount my boot partition how I can rebuild the kernel??? :?


Last edited by ZeLegolas on Sun Apr 04, 2010 2:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 171
Location: /earth/russia/moscow

PostPosted: Sat Mar 20, 2010 6:57 am    Post subject: Reply with quote

Tru http://www.sysresccd.org/Main_Page.
It's a Gentoo based life CD/USB.
Back to top
View user's profile Send private message
Rexilion
l33t
l33t


Joined: 17 Mar 2009
Posts: 974

PostPosted: Sat Mar 20, 2010 7:00 am    Post subject: Reply with quote

Try placing the kernel in a boot directory on your current root partition, make sure that grub.conf points to it. That way you can build a kernel that can access /boot again. However, I think something more is going on. Can you post the output of:

dmesg

please?
Back to top
View user's profile Send private message
aderesch
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2010
Posts: 110
Location: Berlin, Germany

PostPosted: Sat Mar 20, 2010 7:11 am    Post subject: Re: /dev/hda missing Reply with quote

ZeLegolas wrote:
The disk exist! For sure Linux is running on it! :)
When I rebuild udev it's told me to disable CONFIG_IDE but I cannot mount my boot partition how I can rebuild the kernel??? :?

Sounds like you are only missing the device nodes.
Code:
mknod /dev/hda b 3 0; for i in 1 2 3;do mknod /dev/hda${i} b 3 ${i};done

should take care of that (if your shell is bash).
Then mount and build a kernel using the libata drivers -- before booting that, you should replace references to hd? by sd?, at least in all boot-critical places.

ad
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12867
Location: Ste-Foy,Canada

PostPosted: Sat Mar 20, 2010 12:59 pm    Post subject: Reply with quote

What happen when you run this :

Code:

# fdisk -l

_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Mar 21, 2010 2:28 pm    Post subject: Reply with quote

d2_racing wrote:
What happen when you run this :

Code:

# fdisk -l

I just see my other disk not the hda

Code:
 # fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x005423cb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1245    10000431   83  Linux
/dev/sda2            1246        9729    68147730   83  Linux
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Mar 21, 2010 2:30 pm    Post subject: Reply with quote

Rexilion wrote:
Try placing the kernel in a boot directory on your current root partition, make sure that grub.conf points to it.

Difficult for that I have to have access to the boot partition!
Back to top
View user's profile Send private message
Rexilion
l33t
l33t


Joined: 17 Mar 2009
Posts: 974

PostPosted: Sun Mar 21, 2010 2:31 pm    Post subject: Reply with quote

ZeLegolas wrote:
Rexilion wrote:
Try placing the kernel in a boot directory on your current root partition, make sure that grub.conf points to it.

Difficult for that I have to have access to the boot partition!


Okay, and temporarily install grub on it :P
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Mar 21, 2010 2:32 pm    Post subject: Re: /dev/hda missing Reply with quote

aderesch wrote:

Sounds like you are only missing the device nodes.
Code:
mknod /dev/hda b 3 0; for i in 1 2 3;do mknod /dev/hda${i} b 3 ${i};done

should take care of that (if your shell is bash).
Then mount and build a kernel using the libata drivers -- before booting that, you should replace references to hd? by sd?, at least in all boot-critical places.

ad

I'm using bash
:) thanks for i will try
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Mar 21, 2010 2:35 pm    Post subject: Reply with quote

Thanks for your advice.
For the moment I can not do anything on the server
When it will be possible I will try to create the node manually like aderesch told me and build the kernel without CONFIG_IDE.
I will let you know the result...
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Apr 04, 2010 8:03 am    Post subject: Reply with quote

First good news with the command of aderesh I was abled to access to my boot partition (and my other partition too)
The bad new it's If I remove CONFIG_IDE like it's asked udev at the boot time I have this message:
Quote:
Block device /dev/sda1 is not valid root device
Could not find the root block device in

For now I put back my old kernel but if someone have any ideas... :cry:
Back to top
View user's profile Send private message
VoidMage
Advocate
Advocate


Joined: 14 Oct 2006
Posts: 4060

PostPosted: Sun Apr 04, 2010 11:50 am    Post subject: Reply with quote

If you drop CONFIG_IDE (as you probably should),
you need to select correct drivers under CONFIG_ATA.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12867
Location: Ste-Foy,Canada

PostPosted: Sun Apr 04, 2010 2:05 pm    Post subject: Reply with quote

Also your HDD will become /dev/sd* instead of /dev/hd*
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Apr 04, 2010 2:48 pm    Post subject: Reply with quote

VoidMage wrote:
If you drop CONFIG_IDE (as you probably should),
you need to select correct drivers under CONFIG_ATA.

It's what I have done
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Apr 04, 2010 2:49 pm    Post subject: Reply with quote

d2_racing wrote:
Also your HDD will become /dev/sd* instead of /dev/hd*

No it just missing
Back to top
View user's profile Send private message
ZeLegolas
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 128

PostPosted: Sun Apr 04, 2010 2:53 pm    Post subject: Reply with quote

Ok it's fine now. I build ATA section (just module that I need) in static mode not like a module.
I just don't understand why the module are not working :?:
Thanks for your support
Back to top
View user's profile Send private message
VoidMage
Advocate
Advocate


Joined: 14 Oct 2006
Posts: 4060

PostPosted: Sun Apr 04, 2010 3:10 pm    Post subject: Reply with quote

Well, that's rather simple - to load the module, kernel needs to read the disk,
without this module, it can't see it. You'd need an initramfs with that module,
if you'd want to have it outside kernel.
Back to top
View user's profile Send private message
d2_racing
Moderator
Moderator


Joined: 25 Apr 2005
Posts: 12867
Location: Ste-Foy,Canada

PostPosted: Mon Apr 05, 2010 2:28 am    Post subject: Reply with quote

It's a good thing that you can boot your box :P
_________________
Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec
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