LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   /dev/hda2 not a valid block device (https://www.linuxquestions.org/questions/slackware-14/dev-hda2-not-a-valid-block-device-288196/)

KeithKessler 02-09-2005 01:42 PM

/dev/hda2 not a valid block device
 
Hello All,

I finally got my Slack 10.1 install strightened out with one exception: I can't mount hda2. Mounting during the boot via fstab fails with: /dev/had2 is not a valid block device.

This is the output from fdisk -l

Device Boot Start End Blocks Id System
/dev/hda1 * 1 7295 58597056 83 Linux
/dev/hda2 7296 19209 95699205 83 Linux
/dev/hda3 19210 19457 1992060 82 Linux swap

You can see it's there - I formatted it as ReiserFS during the install.

When i try to mount manually with mount /dev/hda2 /mnt/backup I get the same /dev/hda2 is not a valid block device.

I even tried to format it again with mkfs -t reiserfs -f /dev/hda2 and got this:

/dev/hda2 is not a block special device
Continue (y/n):y
Guessing about desired format.. Kernel 2.4.29 is running.
reiserfs_create: can not create that small (0 blocks) filesystem

I've searched the forums and most all the postings on this subject have to do with USB or CD ROM drives.

Any ideas anyone?

Thanks,

--Keith

keefaz 02-09-2005 01:52 PM

As you have no data into this partition, I would try to delete it and re-create it using
cfdisk or similar tool, then re-format it

KeithKessler 02-09-2005 01:59 PM

Gave it a try.

Deleted the partition, wrote the partition table, created a new partition, wrote the partition table then attemtped mkfs -t reiserfs /dev/hda2 and got :

/dev/hda2 is not a block special device
Use -f to force over

Then tried mkfs -t reiserfs -f /dev/hda2 and got:

/dev/hda2 is not a block special device
Continue (y/n):y
Guessing about desired format.. Kernel 2.4.29 is running.
reiserfs_create: can not create that small (0 blocks) filesystem

Thanks for the suggestion though...

Any more ideas anyone??

keefaz 02-09-2005 02:08 PM

Could you post the output of ls -al /dev/hda2 ?

KeithKessler 02-09-2005 02:13 PM

Here you go:

total 62
drwxr-xr-x 2 root root 48 2005-02-08 07:07 ./
drwxr-xr-x 16 root root 62520 2005-02-08 22:47 ../


Thanks,

DaHammer 02-09-2005 02:54 PM

Hmm, so you have no /dev/hda2 it appears. Strange. Try creating it with mknod.
Code:

mknod /dev/hda2 b 3 2

KeithKessler 02-09-2005 03:18 PM

mknod /dev/hda2 b 3 2 yields:

mknod: `/dev/hda2': File exists

Thanks!

killerbob 02-09-2005 05:39 PM

Don't thank him just yet.... mknod reporting that the file already exists means that it didn't do anything. :(

You're using the out-of-the-box kernel? I ask, because reiser isn't compiled in by default in the kernel (at least, it isn't enabled by default in the 2.6.10 image I downloaded). It's possible, if you've downloaded a kernel from kernel.org and compiled it, you forgot to enable reiser support.

What happens if you call it with mkreiserfs instead of mkfs -t reiserfs? I know that theoretically, mkreiserfs just calls mkfs with the type set to reiser, but it might actually work. Also, what if you try a different filesystem type, such as ext3 or ext2?

keefaz 02-09-2005 06:25 PM

To make sure, could you post also the output with:
ls -al /dev/hda*

[edit]
forget this if you run a 2.4.* kernel (default) as I suspected a hotplug/udev failure (which
can appear with 2.6.x)

mikieboy 02-09-2005 06:48 PM

What does your /etc/fstab say for /dev/hda2 ?

KeithKessler 02-09-2005 07:56 PM

Running the bare.i 2.4.29 - what came packaged with 10.1 (will upgrade to 2.6.10 as soon as I get everything else set the way I want) Reiserfs is compiled into the kernel as hda1 is reiserfs and it mounts fine as the root (I once forgot to add reiserfs in on a custom kernel and have learned my lesson :)

fstab looks like:

/proc /proc proc defaults 0 0
/dev/pts /dev/pts devpts mode=0622 0 0
/dev/cdrom /mnt/cdrom auto user,noauto,exec,ro 0 0
/dev/hda1 / reiserfs defaults 1 1
/dev/hda2 /mnt/backup reiserfs defaults 0 0
/dev/hda3 swap swap defaults 0 0

One note I had to created my fstab manually (boot with knoppix and type it all out) for some reason it wasn't created by the 10.1 installer

Also the drive is brand new - ran cfdisk to set everything up then installed 10.1

--Keith

KeithKessler 02-09-2005 09:10 PM

Workaround
 
Okay, I came up with a workaround that I'm satisfied with! I deleted the partition hda2 and then created a small 500 MB partition using hda2 with the remaining free space (~95 GB) I created another partition - hda4. I formated hda4 with reiserfs and can mount it with no problems!

I'm not sure what's going on with hda2 but this will work for me!

Thanks for your help everyone!

--Keith

keefaz 02-10-2005 03:39 AM

Did you try to delete /dev/hda2 directory and do the mknod command ?

KeithKessler 02-10-2005 09:10 AM

I did not try that..

--KK


All times are GMT -5. The time now is 05:28 PM.