MacWorld Linux filesystem to real filesystem?

MacWorld Linux filesystem to real filesystem?

Post by Mktreca » Sat, 03 Apr 1999 04:00:00

Can this be done? Are there any instructions on it?



MacWorld Linux filesystem to real filesystem?

Post by Martin Costabe » Sun, 04 Apr 1999 04:00:00

> Can this be done? Are there any instructions on it?

This shouldn't be hard. I don't have the MacWorld CD, so the following
is not based on experience, but, having played with linuxppc-live when
it was new, I don't see why it shouldn't be possible. The following
steps would be needed (Here I am assuming that you don't have a full
LinuxPPC system, why else would you want to do such a thing?; that the
live.filesystem remains on the CD, or is this copied to the HD first?;
and that it sits in a folder named LinuxPPC):

1- Create a Apple_UNIX_SVR2 partition using pdisk. It should be big
enough, 110M minimum, the bigger the better. Let's say it is /dev/hda9.
You can do this with pdisk under MacOS or from inside linuxppc-live.
2- Start linuxppc-live.
3- Format and mount your new linux partition:
   mke2fs /dev/hda9
   mkdir /newroot
   mount /dev/hda9 /newroot
4- Copy everything over:
   cp -a /live/* /newroot
(There might be a shortcut for 3 and 4:
   dd if=/test/LinuxPPC/live.filesystem of=/dev/hda9
Not sure if this works, though)
5- Copy your ramdisk.image:
   gunzip < /test/LinuxPPC/ramdisk.image.gz > /newroot/ramdisk.image
6- Change the startup script in the ramdisk image to take the new
setting into account:
   mkdir /mnt/rdi
   mount -o loop /newroot/ramdisk.image /mnt/rdi
   Then edit the file /mnt/rdi/root/bin/ so that it mounts
the new partition: Replace the lines
   system( "mount -o loop=/dev/loop0 $files/live.filesystem /live/" );
   etc by something like
   system( "mount /dev/hda9 /live/" );
   You can also comment out the first lines that seek the
7- Compress the ramdisk.image:
   gzip /newroot/ramdisk.image
   and copy /newroot/ramdisk.image.gz to your MacOS system folder. This
might be tricky, you can use LinuxDisks from the Mac side or mount a Mac
partition via
   mount -t hfs /dev/hda5 /mnt/something
   and cp it there. If your live.filesystem lives on the HD, then you
have already the corresponding partition under /test, and you can just
copy it there.
   Then after rebooting in MacOS, you move it to the system folder or to
the folder where the BootX app lives (assuming that it lives on the HD).
8- Cross your fingers, say a prayer, reboot and start BootX.
9- If it works, start thinking about how to change the init scripts so
that you get a standard LinuxPPC-RedHat boot sequence. Shouldn't be