ajray
unread,May 16, 2009, 1:00:55 AM5/16/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to minix3
Hey,
I just recently got this figured out, so I thought I'd share:
Note: This only applies to baremetal installs, so VM users wont
benefit a whole lot (but its still interesting).
When I upgraded from 3.1.3 to 3.1.4 I forgot to move /usr/src/etc/
drivers.conf to its new place in /etc, and that may be one of the
reasons it's not booting properly (I'm guessing not though). Handily,
I have another partition on this computer, and I can use that to
manually move the file.
The first thing you need to do is get the size of each of your minix
partitions. You can do this from linux with:
$ fdisk /dev/sda1
or whichever primary partition and enter 'p' to print that partitions
information. It should give you three sub partitions, which are your
minix root, home and usr directories. Make a note of the size of each
one in blocks; mine are given at the end of this.
Next you have to mount the partitions as loop devices, the first one
is at an offset of 512 bytes from the beginning of the primary
partition (thats where the boot sector goes).
$ losetup /dev/loop0 /dev/sda1 -o 512
The first partition gave a size of 16384 Blocks (or 16384*1024 bytes),
so the offset for the start of the second partition is 512+16384*1024
=
$ losetup /dev/loop1 /dev/sda1 -o 16777728
The second partition gave a size of 1169408 Blocks (or 1169408*1024
bytes), so the offset for the start of the third partition is 16777728
+ 1169408*1024 = 1214251520 bytes.
$ losetup /dev/loop2 /dev/sda1 -o 1214251520
Now, you can mount the loop devices as if they were partitions:
$ mount /dev/loop0 /mnt/minixroot
$ mount /dev/loop1 /mnt/minixhome
$ mount /dev/loop2 /mnt/minixusr
And for me its now a trivial matter to copy the file over:
$ mv /mnt/minixroot/etc/drivers.conf /mnt/minixroot/etc/
drivers.conf.old
$ cp /mnt/minixusr/src/etc/drivers.conf /mnt/minixroot/etc/
drivers.conf
Thats it! I hope this isn't too much extra noise on the list; I just
thought I'd share.
I'd love to hear a better way of doing it if anyone has experience
with this.
Thanks,
~Alex
FDISK PRINT OF MINIX PARTITION:
Device Boot Start End Blocks Id System
/dev/sda1p1 * 1 3 16384 81 Minix / old
Linux
Partition 1 has different physical/logical endings:
phys=(2, 41, 9) logical=(2, 11, 9)
Partition 1 does not end on cylinder boundary.
/dev/sda1p2 3 148 1169408 81 Minix / old
Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(2, 41, 10) logical=(2, 11, 10)
Partition 2 has different physical/logical endings:
phys=(156, 205, 13) logical=(147, 160, 13)
Partition 2 does not end on cylinder boundary.
/dev/sda1p3 148 737 4734128+ 81 Minix / old
Linux
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(156, 205, 14) logical=(147, 160, 14)
Partition 3 has different physical/logical endings:
phys=(783, 14, 63) logical=(736, 254, 63)
Partition 3 does not end on cylinder boundary.