How we made Shift Linux


Recommended Posts

How to make a Neowin Shift Linux Live CD. By crimsonredmk.

This guide will help you create your very own Shift Linux CD. The Shift Linux Live CD is based on Morphix (www.morphix.org) and Debian (www.debian.org).

To start off, you'll need either Debian 4.0, or Ubuntu (K,X,Edu...etc. work fine too). I haven't personally tested others, but any Debian-based distro should theoretically work.

Open up /etc/apt/sources.list in a text editor, and add the following line to the bottom:

deb http://www.morphix.org/debian unstable/

Save it and open up the Terminal. Type "sudo apt-get update", and then "sudo apt-get install morphing-tools". Type "y" when asked if you should install unverified packages. This will install tools that will help you morph your own Live CD.

Now, I suggest you make an easy directory to access, which I'll refer to as "/Shift" in this guide. Make the following subdirectories: xmls, mods, iso, iso1, art, docs, and anything else that makes your life easier.

Next up, download a base ISO, from here: http://www.morphix.org/autobuilds/base/

The newest ISO is recommended. Save it to your /Shift folder.

Next, open up the Terminal, and type the following (change your directories accordingly):

sudo mount -t iso9660 -o loop /Shift/basemod-2.6.17-2007-xxx.iso /Shift/iso1

That command mounts the basemod iso you downloaded into the /Shift/iso1 folder.

Next, in order to be able to write and change the contents of the basemod ISO, type the following:

sudo cp -a /Shift/iso1/* /Shift/iso/

That copies over everything from inside the basemod ISO into a folder for your use.

You can now unmount the basemod ISO by running:

sudo umount /Shift/iso1

Feel free to delete the basemod-2.6.17-xxx.iso now.

Next up, either grab a copy of the official Shift XML, or grab one from here: http://www.morphix.org/autobuilds/mainmod/etch/ Save that XML into /Shift/xmls.

Now, you can open up your favorite text editor and take a peek inside the XML. You'll see a basic structure, and here's what you can, and should change:

version, id, name, description, and the repository list if you're using a Morphix XML (not a Shift one). Change http://127.0.0.1/ into ftp://mirrors.kernel.org, or what ever Debian mirror you please.

Finally,you'll see an extensive list of <packagereq>. In between the two <packagereq>, you can put in your programs. They'll be installed on your finished ISO. If you want to remove a package, say when installing KDE, but you want to remove KTeaTimer to save space, substitute <packagedel></packagedel> for <packagereq>.

Save your XML and open up the Terminal. The following command will process your XML, creating a fully-working Linux install in /tmp/libmorphix-XxXxX. It will then install all of the programs mentioned in the XML, as well as remove those that you chose to remove. Type the following:

sudo mmaker /Shift/xmls/yourxml.xml /Shift/mods/yourmod.mod

You'll see a cdebootstrap command, let that run. The entire mmaker command was completed in about 15-60 minutes, depending on your system and the packages you chose.

When that's done, you'll receive an output from the mmaker command such as "module-builder /tmp/libmorphix-XxxXx /Shift/mods/yourmod.mod" Make a note of the "tmp/libmorphix-XxxXx" part.

THE FOLLOWING IS OPTIONAL, BUT RECOMMENDED

Now, in the Terminal, type the following:

sudo cp -r /etc/resolv.conf /tmp/libmorphix-XxXxx/etc/

Of course, change your libmorphix directory. That command copies your network settings to the distro which we are about to use. Type:

sudo chroot /tmp/libmorphix-XxXxx

Then,

sudo mount -t proc /proc proc

And you're in! This is your distro. Change around anything you wish, but keep everything libmorphix specific (/tmp/libmorphix-XxXxX/etc = /etc)

Here are some suggested commands:

sudo apt-get update sudo apt-get install whatever (deborphan) sudo apt-get remove whoever sudo apt-get clean deborphan sudo apt-get remove deborphan-listed-packages (they aren't needed)

And finally, to put everything back into a Live CD state:

sudo rm /etc/resolv.conf sudo touch /etc/resolv.conf sudo umount /proc exit

THIS IS THE END OF THE OPTIONAL PART!

Now, make your distro into a MOD by typing:

sudo module-builder /tmp/libmorphix-XxxxX /Shift/mods/yourmod.mod

Now, copy /Shift/mods/yourmod.mod into /Shift/iso/mainmod

Now, we brand!

Make a new user, name him "shift". Set a password, and log in as shift. Now, you've got the place to yourself. To brand, I suggest making a folder named "art" in /home/shift, and then pointing the modifications to /home/shift/art/

Here's an example. I want a wallpaper. Copy it to /home/shift/art/wallpaper.png. When changing the wallpaper, set it to /home/shift/art/wallpaper.png. Do this with sounds, the screensaver, etc.

All modifications from Gnome and KDE work this way.

When you're all done branding, open up the Terminal (still logged in as shift), and type:

sudo make-mini --homedir-all shift /Shift/mods/home.mod

This zips up everything (including your branding modifications, in the /home/shift directory, and saves it as a MOD in the /Shift/mods folder. You're free to log out and log back in as your regular user now.

Now, move /Shift/mods/home.mod to /Shift/iso/minimod/

And, time to jump in, in Terminal, type:

sudo make-iso /Shift/iso /Shift/yourfirst.iso

Don't boot-up just yet! You need to change some things first. In the Terminal, type:

sudo morphix-rebrand -T ShiftLinux -g ShiftLinux -h shift -u shift /Shift/yourfirst.iso /Shift/yoursecond.iso

Here's what this all means: -T Changes the title of the distro, -g changes the title in the GRUB menu, -h changes the computer's name when booted, -u changes the user name, but MAKE SURE IT'S THE SAME AS THE USER YOU MADE EARLIER!

And there you have it. A working, branded ISO. Feel free to boot it up using QEMU (qemu -cdrom /Shift/yourfirst.iso)

Now, for some post-making notes:

To change the GRUB boot screen:

Open up the Terminal, and type the following (change your directories accordingly):

sudo mount -t iso9660 -o loop /Shift/yoursecond.iso /Shift/isomount

Next, in order to be able to write and change the contents of the ISO, type the following:

sudo cp -a /Shift/isomount/* /Shift/isoextract/

You can now unmount the ISO by running:

sudo umount /Shift/isomount

Then, make the /Shift/message directory. cd to it in the Terminal, and type:

cpio -iv < /Shift/isoextract/boot/grub/message

Open up the GIMP and your image file. Save it as a PCX file, and name it background.pcx. Move it into your message directory (/Shift/message/). You should have overwritten the existing background.pcx file.

Change the directory in Terminal to /Shift/message/, or wherever you put the extracted files and type:

ls | cpio -o > /Shift/isoextract/boot/grub/message

That saves a new message.cpio, with the new boot graphic. Now, type:

sudo make-iso /Shift/isoextract/ /Shift/yourfinal.iso

To brand Flux (change the wallpaper):

Install Fluxbox on your build PC, and log in as shift with it. This will create a .fluxbox folder. Now, download this, and extract to /home/Shift:

[1]

Now, open up /Shift/fluxthemes/Operation in a text editor. Look for the /home/shift/art/wallpaper/Glassy.png part, and edit that location with the location of the wallpaper you wish to use. Of course, you can copy over the entire line to another theme, but I did it this way to make my life easier.

So there you have it! Shift into Neowin Linux!

Edited by CrimsonRedMk
Link to comment
Share on other sites

  • 4 months later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.