empeg:/# rw
empeg:/# chmod 755 mkprgpt
empeg:/# ro
empeg:/# ./mkprgpt
VFS: Can't find an ext2 filesystem on dev ide0(3,2).
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
VFS: Can't find an ext2 filesystem on dev ide0(3,66).
mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
or too many mounted file systems


This is the script attempting to mount the partitions before we do anything to them. This is neccessary to check that they weren't already formatted. As they weren't mount spews this error. ie...it's all good.


mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hda2 is mounted.
warning: 495 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1663 blocks (5.07%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hdc2 is mounted.
warning: 306 blocks unused.

Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
32768 inodes, 32769 blocks
1653 blocks (5.04%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
8193, 24577

Writing inode tables: done
Writing superblocks and filesystem accounting information: done


Now we have formatted both paritions. Good.

Entry for /dev/hda2 appended to /etc/fstab
Entry for /dev/hdc2 appended to /etc/fstab

...modified /etc/fstab.

mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option
Old /etc/preinit.d entries found! Moving to /programs0/preinit.d

Now why do we see the mount errors here? mkprgpt has figured out that old /etc/preinit.d scripts were present, and therefore calls rwp before moving them, and this is the call that appears to fail. But later on, we see that /programs0 definately has preinit.d in it - suggesting that it didn't fail. Multiple rwp's should be fine.
But both rop and rom are re-mount scripts - they assume that the paritions were mounted somehow first. Ahhhhhh....they weren't mounted first - the first mount commands failed didn't they. (This is one of those hard to test without destroying you /dev/hda2 parition bugs).
Ironically, what has happened is near exactly what you were asking for. Everything has been done except for the creation/moving of preinit scripts. The /programs0/preinit.d entry that you see is actually on the root drive under /programs0, not on /dev/hda2. Remember that mountpoints in unix are just directories? Well if you create a directory in an unmounted mountpoint like we just did.

empeg:/# ro
empeg:/# rom
empeg:/# rop
mount: /programs0 not mounted already, or bad option
mount: /programs1 not mounted already, or bad option


Same deal as before rop is trying to remount unmounted directories.

Ok. So at this point:
paritions are formatted.
fstab is correct.
rwp and rop are there.
You have /programs0/preinit.d scripts living in the root partition, not /dev/hda2

Ok......this will work.
rw
cd /programs0
mv preinit.d /etc/
ro
./mkprgpt

I've just updated the script so that other people wont see this... (you don't need to upgrade in this situation though)


Edited by genixia (15/10/2002 07:34)
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.