Running a GNU/Linux Distribution on Mac OS X using Bochs

We sometimes need a real GNU/Linux system to fiddle with, even when we are on our Mac. It is useful to test out configurations, etc. Bochs works well as an emulator. Slow, but it is free. What to install for the GNU/Linux system, though? Giagd would be interesting, but we really wanted a more standard library. DSL was just about perfect. We don't want a lot of geegaw slowing our system down with Bochs. DSL is used in a variety of ways. We decided to take the ISO system, boot it up, and convert it to run from the hard disk image. There are some scripts for this at the DSL site; however, they didn't work for us, so we flew solo. We wrote about setting up disk images in this article, and we will need one to transfer the system to hard disk. Here is a picture of DSL booting up via the ISO image:



We are getting further along in the boot process. The autoconfiguring of devices is very slow. We'll fix that later on:



Edit your ~/.xinitrc script so that the only thing that runs is fluxbox:



Of course, you can change this later, it is just nice to load X as quickly as possible at first. The default is pretty slow under Bochs. To get root access with this distribution, there is a shell off of the menu. Use the apple key and click to get a menu on the desktop:



Here we have formatted and mounted our disk image. We need everything in the KNOPPIX directory (guess what DSL is based on?). Rather than use cp to copy the files, we use tar with a pipe between:

tar -cvpf - . | tar -xp -C /mnt/hda/

This catches strange files better, it shows you what files are copying, and we have always had good luck with this method of transferring between filesystems:




DSL comes with Lilo, and that suits us fine. We need to remove grub and copy linux24 to /boot on the new partition. We didn't need minirt24.gz, but weren't sure. You may want to copy it over just in case:



We want to do a chroot to the new root filesystem:



Here is the lilo.conf we used. Run lilo:



Let's reboot and see what comes up:



It loads the kernel OK, but we do have some problems with /etc/fstab, which we forgot to edit:



Note that if you forget to set the root password for root, the distribution is set up so that you can run sudo startx, then use xterm to change the root password.

Here is what the hardware is looking like on our boot from our hard disk image:



This /etc/fstab file worked for us:



The next boot went well:



Here are the /etc/init.d srcripts that we removed to make booting tolerable:



Now, these automagic scripts inherited from Knoppix are nice and all, but they really do slow this down too much for our purposes. We hope you have as much fun with this as we did.

arrow
arrow
    全站熱搜

    Bluelove1968 發表在 痞客邦 留言(0) 人氣()