Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!sbsvax!roeder From: roeder@sbsvax.UUCP (Edgar Roeder) Newsgroups: comp.os.minix Subject: /dev/hd5 Keywords: Minix-ST, use of /dev/hd5 as Minix-Filesystem Message-ID: <689@sbsvax.UUCP> Date: 20 Feb 89 18:16:11 GMT Organization: Universitaet des Saarlandes, Saarbruecken, W-Germany Lines: 38 Last weekend i tried to address my SH205 as one Filesystem via /dev/hd5 under Minix. I ran across one serious problem. At boot time the physical sector 0 of the harddisk is used to determine the size of the harddisk and the available partitions. When you address it as a single filesystem via minor number 5 the same sector 0 is now used to hold data. The next time you try to mount this drive after a reboot the system refuses this because the partioning info is not valid anymore. My proposed solution is to use minor 5 to address the whole disk without sector 0. You have still access to this sector via minor 0. A patch to stwini.c follows. - Edgar ----------------------------- start of patch ----------------------------------- *** stwini.c.old Mon Feb 20 18:43:31 1989 --- stwini.c Mon Feb 20 18:43:17 1989 *************** *** 105,111 **** if (pi[minor].pi_flag == PI_INVALID) pi[minor].pi_size = 0; } ! pi[minor].pi_size = hi.hd_size; } TRACE( for (r = 0; r < MAX_MINOR; r++) --- 105,113 ---- if (pi[minor].pi_flag == PI_INVALID) pi[minor].pi_size = 0; } ! /* physical sector 0 is needed for partition info */ ! pi[minor].pi_start = 1; ! pi[minor].pi_size = hi.hd_size - SECTOR_SIZE; } TRACE( for (r = 0; r < MAX_MINOR; r++) ------------------------------ end of patch ------------------------------------