Preinit help - URGENT!!

Posted by: furtive

Preinit help - URGENT!! - 23/01/2003 02:36

I'm in the middle of installing Preinit. I've followed the instructions on the website, and so have done this:

ftp -s:install.ftp <empeg-hostname>

mkdir /programs0
mkdir /programs1
mke2fs /dev/hda2
mke2fs /dev/hdc2
mount /dev/hda2 /programs0
mount /dev/hdc2 /programs1

Now when I try to make my drives read only (ro or rom) I get this error:

mount: can't find /drive1 in /etc/fstab or /etc/mtab

What have I done wrong, and how do I fix it?

Thanks.
Posted by: furtive

Re: Preinit help - URGENT!! - 23/01/2003 03:27

My second drive is not hdc2, but is hdb2 apparently

Not sure why, but maybe this should be reflected in the instructions somewhere???

I get this error:

mke2fs /dev/hdb2

mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Could not stat /dev/hdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

And I still get the error above as well.
Posted by: wfaulk

Re: Preinit help - URGENT!! - 23/01/2003 09:04

That's odd. Usually both hdb2 and hdc2 exist, both pointing to the same thing, for the sake of consistency with the MkIs.

Have you installed other hacks?
Posted by: furtive

Re: Preinit help - URGENT!! - 23/01/2003 09:24

All I've got installed is Beta13-Dev, Hijack, and the games that I am trying to get onto the Hijack menu.
Posted by: genixia

Re: Preinit help - URGENT!! - 23/01/2003 12:17

The Mk1 empegs had 2 ide channels, so disks would be /dev/hda and /dev/hdc.
The Mk2 empegs only have 1 ide channel, so they are /dev/hda and /dev/hdc

However, the Mk2's have had the device node for /dev/hdc changed to point to what would normally be /dev/hdb. This enables Mark2 software to be consistent with Mark1 software..

But that shouldn't be the cause of your problem;

What does cat /etc/fstab reveal?
Posted by: mcomb

Re: Preinit help - URGENT!! - 24/01/2003 01:38

mount: can't find /drive1 in /etc/fstab or /etc/mtab

IIRC drive1 isn't in fstab as the player mounts it directly via its dev entry. I definitely remember adding it to mine after adding a second disk. So the question would be did this work before and if so, why?

-Mike
Posted by: furtive

Re: Preinit help - URGENT!! - 24/01/2003 01:43

empeg:/empeg/bin# cat /etc/fstab
#
# /etc/fstab
#
# <device> <mountpoint> <filesystemtype> <options> <dump> <fsckorder>
/dev/hda5 / ext2 defaults,ro 1 1
/dev/hda4 /drive0 ext2 defaults,ro 1 1
none /proc proc defaults
Posted by: genixia

Re: Preinit help - URGENT!! - 24/01/2003 14:16

Hmm, I saw the same thing happen to me once upon a time (I believe when I upgraded to beta13), and never really worked out what caused it.

Anyway, here's the fix:

rw
echo "/dev/hdc4 /drive1 ext2 defaults,ro 1 1" >> /etc/fstab
ro


It's *very* important to ensure that you use ">>" and not ">" in the above line. ">>" tells the shell that the input is to be concatenated (ie appended) to the existing file. ">" would overwrite the file completely.
If you're at all unsure, then perhaps backing up the /etc/fstab file first would be a good idea;


cp /etc/fstab /etc/fstab.bak


While you putting that line in, you might also want to consider also;

echo "/dev/hda2 /programs0 ext2 defaults,ro 1 1" >> /etc/fstab
echo "/dev/hdc2 /programs1 ext2 defaults,ro 1 1" >> /etc/fstab


which will make ({re|un})mounting /programs0 and /programs1 easier.
Posted by: furtive

Re: Preinit help - URGENT!! - 24/01/2003 17:09

I'll give it a go.

Many thanks.
Posted by: furtive

Re: Preinit help - URGENT!! - 25/01/2003 02:08

That seems to have done the trick

Out of interest, what do those commands do?

Thanks.
Posted by: mtempsch

Re: Preinit help - URGENT!! - 25/01/2003 06:08

They append the stuff inside the quotes to the /etc/fstab file. This in turn tells the system to automatically mount the file systems specified on the lines at boot (with default options, but read-only). It also simplifies later mounts by having the options set and which mountpoint and partition that belongs together, specified in advance.

If you had after boot unmounted the /drive0 partition, you can the mount it by simply saying "mount /drive0" instead of also having to specify the options, filesystem type and partition...