Click to See Complete Forum and Search --> : Why can't I ls my hdb?


LanSlide
03-01-2001, 03:03 PM
As Strike (Hal) suggested... I used dd to copy a floppy to my hdb. I think it all was copied to the drvie. There were no errors. Now I try to bring up the dir of hdb ??/dev/hdb?? with ls and and it says permission denied. I can't see hdb anywhere icon, or no way to get to hdb. How can I get in and change permissions when I can't find the drive?
Thanks

[ 01 March 2001: Message edited by: LanSlide ]

[ 01 March 2001: Message edited by: LanSlide ]

MBMarduk
03-01-2001, 03:21 PM
You prolly need to specify what PARTITION on /dev/hdb...like "ls /dev/hdb1" or something.
Did you mount it?
Did you by any chance dd the floppy across the whole hdb? :D

LanSlide
03-01-2001, 05:52 PM
Yes I did the dup data across the whole drive. I tried to go to hdb and it must have been mounted, because it said I didn't have permission to look. I guess?? I have a gateway and the floppy is too slow, so I thougt I'd boot off the hard drive.
Thanks!
PS I have to aggree
Techno...!!! :p

bdg1983
03-02-2001, 08:47 AM
I believe you need execute permission to list any directory.

Try 'chmod +x /mnt/hdb'

Change 'mnt' to what you use.

x
03-02-2001, 10:21 AM
I suggest that you look in /etc/fstab, you'll find a list of all automatically mounted partitions & where they are mounted.
Then move to that directory ("cd .. ) or preferably use the Midnight Commander, strat it by typing "mc".
It's a very easy way to navigate through your filesystem!

Lorithar
03-02-2001, 10:30 AM
*hmmms*

As it get it you dd if=/dev/fd0 of /dev/hdb?

ouch.

*please* tell me you dd if=/dev/fd0 of=/[mountpoint]/[filename] .......

if you dd'ed directly onto the /dev/hdb I suspect that your filesystem on /dev/hdb is now corrupted ... the filesystem that existed on the floppy is now driectly written out to the physical device /dev/hdb. To recover from this point I'd need to know a) what filesystem was on the floppy and b) how much data was on the floppy. .. IT IS possible to get the original /dev/hdb back .. but to be honest I don't know how well or how much ..

If you wrote the floppy out as a file .. exactly where did you write it to .. and where (therefore) is hdb mounted
(at the commandline type mount -- this will list partitions and where they are mounted.)
if you can't ls the /mountpoint where /dev/hdb is attached as root, what are the permissions displayed when you from above the mountpoint.

LanSlide
03-04-2001, 07:39 PM
ouch.

*please* tell me you dd if=/dev/fd0 of=/[mountpoint]/[filename] .......

I just
dd if=/dev/fd0 of=/dev/hdb

I can see no filename due to it says I have no permission, on the floppy, or hdb. How would you tranfser the floopy to the hard drive :confused:
Thanks

Lorithar
03-05-2001, 12:40 AM
*grins* and follows up online (I replied via email earlier)

dd
is a VERY powerful tool. it basically bitcopies from if to of
in this case we copied a floppy from bit 0 to end onto the /dev/hdb device.
Thus we now have a harddisk which should have a partition table and a boot block and filetables with the bootblock filetable and data from a floppy.
NOT good.

Part 1 of the issue here. If /dev/hdb was one big partition we may be in REAL luck here because we can rebuild the ENTIRE drive from the blocks farther down the drive.

If however there were multible partitions on the drive we will likely have to rebuild the drive from scratch .. or backup if one exists. I just hope that the first partition was *much* larger than 1.44 mb.
Unfortunately the key here is where are the blocks we need.
These blocks which contain filesystem info are located on the disk on the first block, used most and then ever 8,193 blocks down ... on a standard fdisk setup. However, I decided that I wanted more files on my disks and have a blocksize of 512 .. therefore on my disks the blocknumber would be different that if the block was 1024.

Anyhow .. I hope I can help get the drive back.

For the record I'm not sure why we were copying from floppy, but what one should do to retrieve a file is
a) mount the floppy
(insert floppy to drive, then issue mount /dev/fd0/ [whatever mountpoint you use for floppy]
and the cp [mountpointfloppy]/filename [destinationfile]

LanSlide
03-05-2001, 06:56 PM
Originally posted by Lorithar:


For the record I'm not sure why we were copying from floppy, but what one should do to retrieve a file is
a) mount the floppy
(insert floppy to drive, then issue mount /dev/fd0/ [whatever mountpoint you use for floppy]
and the cp [mountpointfloppy]/filename [destinationfile]

Being new to Linux I had no idea that copying a floppy to a hd was going to be so hard for the file to come up. I run wireless and I have a gateway for my LAN. Booting from the floppy it takes over 4 minutes just to get online. So what I have done was purchased a hard drive to boot the gateway faster. Copying the file to the drive is no big problem using "Strikes" way of doing it. The only problem is that when the drive comes up smokin fast, it gets where the file wants the floppy, at this point it's firing up my wirelss card. What I needed to do is go in and change all references of fd0 to hdb. Now the big problem starts. The hard drive now has permissions that I can't change. I thought when I am the superuser I would be able to get into any thing. That's not the case. The drive will only hold this boot for my gateway and a swap. When running off just the floppy it states WARNING NO SWAP! So I though I'd give it one.
Thanks
Dan