Your Debian QEMU JeOS Box Ready to Boot
by Mike Levin SEO & Datamaster, 07/28/2010
Note: If you’re looking for the juiciest jeOS box, download Levinux, my personal Linux distro (actually, a remix), which is ~15MB to download, and inflates to only about ~50MB even after pulling down Python, vim & git for web development!
Okay, I think we’re all getting a bit impatient now to see our Noah’s Arc JeOS box boot. Edit your /etc/fstab file system table. I told you to use the nano text editor last time, and that’s fine. But I think it’s time to introduce you to the much more powerful, but strange vi program. It’s actually vim (for vi iMproved), and will become as important over time as the Linux shell itself. The key thing to remember is if things get strange, hit the [Esc] key. So, type:
vi /etc/fstab o proc /proc proc defaults 0 0 /dev/sda1 /boot ext3 defaults 0 0 /dev/sda2 none swap sw 0 0 [Esc] :w :q
vi is just strange enough that even just getting through these instructions may be too much. If you have trouble, just type [Esc]:q! which will take you out of vi without saving your edits, and you can switch over to nano. But if you’re feeling brave, just hit [Esc]i to go back into insert mode when things get strange and start typing again. Unlike most editors, vi has “modes” and the default one isn’t typing! You have to put vi into typing mode with either i (for insert from where I am) a (for append at the end of this line) or o (for create new line beneath where I am and start there). It’s strange, but mastering this program will serve you very well over the years.
Now that your /etc/fstab file exists, we are going to do the bare minimum now to get a workable system. You can always set up networking after a successful reboot. So let’s give the “root” account a password. Type:
Linux will prompt you to Enter new UNIX password. Do so. Linux will prompt you to Retype new UNIX password. Do so. If it worked, you will see:
passwd: password updated successfully
There’s one last thing I want you to do for a perfect reboot experience to get rid of an annoying little error message during boot. Get out of chroot by typing:
Now, we’re going to delete an invisible directory in /dev by typing:
rm -rf /mnt/sda1/dev/.udev/
Congratulations! We are done making a QEMU Linux Debian bootable base system. With no further ado, type:
shutdown -h now
Simply close the window. Your DOS CMD window that we’ve been starting QEMU from should free-up and you can use command-history to up-arrow and remember your last command. Now simply back-space over the Knoppix bit, so you will be executing:
qemu -hda harddrive.raw
If it worked correctly, a the new Linux console should pop up with a tiny Linux penguin will appear in the upper-left. Tons of stuff will scroll by. There will be no errors reported, and it will end in a login prompt:
Log in with root as the login and your previously chosen password as the password.
Immediately shut down with shutdown -h now, and copy off that harddisk.raw file. It’s a pretty rockin’ cool asset to your career.