what's fstype 83? "Linux"?
i've found an old (debian slink?) drive around the house, and
plugged it in -- but i can't mount most of the partitions!
root# sfdisk -l /dev/hdb
Disk /dev/hdb: 4956 cylinders, 16 heads, 63 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/128/63 (instead of 4956/16/63).
For this listing I'll assume that geometry.
Units = cylinders of 4128768 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hdb1 * 0+ 3 4- 16127+ 83 Linux
/dev/hdb2 4 64 61 245952 83 Linux
/dev/hdb3 65 618 554 2233728 5 Extended
/dev/hdb4 0 - 0 0 0 Empty
/dev/hdb5 65+ 573 509- 2052287+ 83 Linux
/dev/hdb6 574+ 618 45- 181439+ 82 Linux swap
yes, i know, that's an awful place for the swap partition. i
know, i know. i'm feeling much better now -- this was a few
years back, when i set this puppy up. it sure would be nice to
mount it and recover the things i'm interested in...
i'll try mounting partitions hdb1, hdb2 and hdb5:
root: /mnt# mount -t ext2 /dev/hdb1 /mnt/1/
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
or too many mounted file systems
hmm! maybe if i leave off the trailing / no the mount-point--
root: /mnt# mount -t ext2 /dev/hdb1 /mnt/1
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
or too many mounted file systems
nope. let's try partition 2 for fun:
root: /mnt# mount -t ext2 /dev/hdb2 /mnt/2
no complaints -- IT WORKED? hmm! how about partition 5:
root: /mnt# mount -t ext2 /dev/hdb5 /mnt/5
mount: wrong fs type, bad option, bad superblock on /dev/hdb5,
or too many mounted file systems
can't mount #1 or #5? but #2 is okay?
root: /mnt# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 182M 47M 126M 27% /
/dev/hda1 7.6M 5.3M 1.9M 73% /boot
/dev/hda5 228M 203M 13M 94% /home
/dev/hda6 1.8G 828M 953M 47% /usr
/dev/hda7 1.5G 1.4G 133M 92% /var
/dev/hdb2 232M 24M 196M 11% /mnt/2 <== this one's okay
hdb[125] are all "Linux" filesystem type 83 (ext2, right)? but
only hdb2 would mount? very much odd, here.
ideas? (i think this was my slink disk drive -- i'd like to use
it to alleviate some space pressure on my woody server...)
--
I use Debian/GNU Linux version 3.0;
Linux server 2.4.20-k6 #1 Mon Jan 13 23:49:14 EST 2003 i586 unknown
DEBIAN NEWBIE TIP #94 from Joost Kooij <joost@topaz.mdcc.cx>
:
How do you RESTORE THE DEFAULT PERMISSIONS back on the / tree?
If you have a clean host with very similar filesystem contents,
try this:
ssh root@okayhost "find / -regex '/\(mnt\|proc\|tmp\)/.*' -prune -or \
-not -type l -not -type s -printf '%04.4m %u %g %p\n' " \
| while read mode user group path
do
chown $user.$group $path
chmod $mode $path
done
Alternatively, create a huge script like this:
find / -regex '/\(mnt\|proc\|tmp\)/.*' -prune -or \
-not -type l -not -type s -printf 'chown %u.%g %p\nchmod %m %p\n' \
> fixperms.sh
And copy that to the broken machine and run "sh fixperms".
It might not fix all files, unless the two hosts are nearly
equal, but enough to let you find the missing ones to fix by
hand. Maybe /home/* will need special care.
Also see http://newbieDoc.sourceForge.net/ ...
Reply to: