Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Make MyDSL Remaster with DSL V3.3Now, I've decided, A dummy's guide to remastering DSL CD< Next Oldest | Next Newest >
linux4all Offline





Group: Members
Posts: 13
Joined: April 2006
Posted: May 01 2007,15:10 QUOTE

How to Remaster your Damn Small Linux Boot CD

This howto describes how to remaster a live DSL CD with all your personal settings, preferred applications, and customizations. A previous howto was submitted by clivesay from the DSL Forums. Now that we have progressed to Damn Small Linux, Version 3.3, some of the information in that document needs to be updated. I also felt that as a newbie I could write a howto on this subject and include some details which would help other newbies to understand how the new version of the re-mastering script works. This method is also intended to help anyone who doesn't have a large amount of ram on their system.

The system I am using to make my remastered CD has the following:
* 256Meg ram
* 450 Mhz processor
* 10 gig hard drive.

This system is quite adequate for DSL. I have it set up as a dual boot system with Windows98SE, and Kubuntu, and I use a Live CD to boot to Damn Small Linux.

If I had 512 meg of ram, I don't think I would need to use my hard disk at all, but for the purpose of this document, I am using a small portion of the hard drive for my MyDsl directory, and another small portion to hold the ISO file.

Lets get started. There are really three steps involved in re-mastering a boot CD to your liking.
1. Prepare your computer for the remastering process
2. Set up DSL as you like it and add the applications you desire.
3. Create a new DSL .ISO file and burn it to a CD.

First, We're going to set up our computer to store our Mydsl extensions on the hard drive. This serves two purposes. It allows us to keep our downloaded programs from one boot to the next, and it saves ram space when re-mastering our boot CD.

To do this, we must have a linux partition on the hard drive with enough room to hold all our extensions (downloaded programs). In my case this was easy, because I already had a linux partition for my installation of Kubuntu. If you don't already have a linux partition on your PC, you can either install another hard drive on your pc and format it as a linux drive, or you can use a program such as Powerquest Partition Magic to shrink one of the existing partitions of your hard drive, freeing up space to create a linux partition. Once the space is available, use cfdisk to create a Linux ext2 or ext3 partition in the free space. There is a short tutorial on doing this at the end of this document.

After inserting the DSL Live CD, I boot up the system, which eventually gets me to the boot prompt:

Code Sample
boot:

here I enter the cheatcode to load DSL into Ram, and then start:
Code Sample
boot: dsl toram<enter>

Now I'm lucky enough to have a high-speed internet connection, and a local area network. If you use dialup, you will have to get connected through your modem, and that's another story which I don't intend to cover. The rest of this tutorial assumes that you are connected to the internet.

Once DSL is up and running, you will find the Mount tool at the bottom right corner of the screen. It comes up with a bar in the center labeled "floppy", or "cdrom". Clicking on that bar will cycle through the mountable media. Clicking on the bottom bar will mount the media shown.  Use this tool to mount your Linux partition. Mine is hda4. Yours may be something different.  

Open Emelfm as superuser. Navigate to /mnt/hda4 in one of the panels. Use the "MkDir" button to create a directory called "dsl". Then navigate to /mnt/hda4/dsl, and create two sub-directories called "myremaster" and "dsliso".

At this point, we have prepared our hard drive for use in the re-mastering process, however, if you now start the Make myDSL Remaster script, you get the message:
Code Sample
You must boot with a live CD with the mydsl=xxxx
Or have a known working autoscan mydsl directory.

Well, we didn't boot that way to start with, so lets reboot now. At the "Boot" prompt, we enter:
Code Sample
boot: dsl toram mydsl=hda4/dsl/myremaster

Now, I've decided that my re-mastered CD will have the following:
* All my favorite bookmarks will be loaded into Firefox.
* I'll have OpenOffice.org for my office suite
* I'll have Samba, so I can network to my other computers, both Windows and Linux.
* I'll have MPlayer as an alternative media player.

So first, lets get my bookmarks. Here I cheated a bit. I have been using Firefox for a long time, so the last time I booted up normally on this PC, I launched Firefox, and I exported my bookmarks to a file on hda4. The file (full path) is /mnt/hda4/bookmarks.html.

To get the bookmarks into Firefox, first launch Firefox, either through the start menu, or by clicking on the Firefox icon on the desktop. Then on the Firefox menu bar, click on:

Bookmarks - Manage Bookmarks,

which brings up a bookmarks management window. On the menu bar here, click on:

File - Import - From File - Next

The Import bookmark file window comes up, allowing you to navigate to the directory where your exported bookmarks file is located and select the file... in mycase, /mnt/hda4/bookmarks.html. When you click the "Open" button, your bookmarks will be imported.

Now that my bookmarks are in place, let's use the internet to add the applications I desire to my system.

Click on the "MyDSL" icon on the desktop to launch the MyDSL tool. You'll get a small window on the desktop with 12 buttons on it, representing the 12 repositories of applications you are able to access. Now you can download and install as many applications as you would like to have in your personal version of Damn Small Linux. Here are my choices:

Gaim - From Testing - Instant messaging for several protocols, including Yahoo.
Samba - From Net - Networking tool for sharing files on Windows networks.
MPlayer - From Multimedia - Versatile multimedia player
OpenOffice.org - From UCI - The free replacement for the Microsoft Office suite.

When you press the download button for your applications, you will be asked to which directory you want to download the application. Make sure that the destination box contains the correct address. (In my case, it's /mnt/hda4/dsl/myremaster)

OK, that's all I want in this remaster, so now, let's do a backup so that we will save our setup and bookmarks, and any other information that may have been placed in our home directory. Click the desktop icon called "DSLpanel", then click the "Backup/Restore" button. In the little window that appears, type in the Drive you want to use for backup, then press the "Backup" button. In my case I type in "hda4", so I'll be able to find my backup file in /mnt/hda4/backup.tar.gz
This is the way I want my system restored when I boot the new CD that i'm about to create, so to make that happen, copy the backup.tar.gz file to your mydsl directory... in my case, /mnt/hda4/dsl/myremaster. Once copied, rename the file myconfig.tar.gz.

At this point, the directory /mnt/hda4/dsl/myremaster contains the following:
gaim-1.5.0.dsl
gaim-1.5.0.dsl.md5.txt
mplayer.dsl
mplayer.dsl.md5.txt
myconfig.tar.gz
openoffice.org2.0.uci
openoffice.org2.0.uci.md5.txt
samba.dsl
samba.dsl.md5.txt

Now it's time to create a new .ISO file, and optionally, burn the ISO image to a CD. From the start menu, choose:
Apps - Tools - Make myDSL CD remaster

A terminal window will open on your desktop, and the automated MyDSL script will show its startup message. There is a warning here, stating that you must have booted with a live CD, with the "mydsl=xxxx" option. Here is where the advantage of having used a directory on the hard drive to download your applications. If you did not boot with this option, you now have the chance to back out of your MakeMyDSL script, and reboot with the correct option or options. All your work will be preserved.

The script asks you to enter the working directory. My entry would be:

Code Sample
/mnt/hda4/dsl/dsliso

Next, the script asks for any boot time options. I like to leave this blank so I still have control over my options, but you can enter whatever bootcodes you prefer, like toram, secure, home=hda4, etc.
After you enter your boot options, the script goes about creating the MyDSL iso. When it finishes doing that, it asks if you want to proceed to burning the CD. If you have used the "toram" option, and you have a cd writer, you can enter "y", and the script will then guide you through the process of burning the CD. Otherwise, you can either:
* Copy the file /mnt/hda4/dsl/dsliso/mydsl.iso to removable media and burn it to CD on another computer.
* Reboot to another linux operating system that has a working CD burning app.
* Use the networking capabilities of DSL to transfer the mydsl.iso file to another networked computer, where you have CD burning capabilities.

That's it!!!

I hope this will help newbies such as myself to understand the re-mastering process. I welcome those with more experience to add their comments and suggestions. My next how-to will be a simple way of using Samba to share files on a windows network.
Back to top
Profile PM 
linux4all Offline





Group: Members
Posts: 13
Joined: April 2006
Posted: May 01 2007,15:33 QUOTE

USING FDISK TO CREATE LINUX PARTITIONS.

In the previous post, I promised I would describe how to create linux partitions on your hard drive, in case you had not already done so.
Here, I describe how to add two Linux partitions to a small hard drive with Windows98SE already installed.

Here are the steps to creating linux partitions in the free space of a hard drive.

After booting your PC from the DSL live CD, Right click on the "ATerminal" icon on the desktop, and choose "Aterm as Super User". A terminal window will open with the title bar labeled "sudo" and show a prompt as follows:
Code Sample
[/home/dsl]#

Be careful what you do while acting as Super User. Here, we are going to use the command line tool "fdisk" to create Linux partitions on a hard drive that has been previously loaded with Windows 98SE. Lets find out what is currently on my hard drive.

In the terminal window, enter the following command:
Code Sample
fdisk -l

You should get a response will look similar to this:
Code Sample
Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *           1         383     3076416    b  Win95 FAT32
/dev/hda2             384        1658    10241437+   c  Win95 FAT32 (LBA)

[/home/dsl]#

This shows that I have one hard drive made up of the following:
/dev/hda1 is the bootable partition, and it's formatted as FAT32 This is my Windows 98 installation
/dev/hda2 is another Windows FAT32 partition, where I store my data files.

From the other information shown, I can determine that there is free space available on the hard drive. The second and third line reports that there are 2434 cylinders on the hard drive, and shows that Units are reported as cylinders. Looking down to the line for /dev/hda2, you see that it starts at cylinder 384, and ends at cylinder 1658, so cylinders 1659 to 2434 are empty and unallocated. You can use simple math and the data shown to determine that there is about 6.4Gigabytes of unused space on the hard drive.

Now that we know what we have available, lets use all the free space on the hard drive to create two Linux partitions.

to start fdisk in interactive mode, enter the following command:
Code Sample
fdisk /dev/hda

this is what you should see:
Code Sample
[/home/dsl]# fdisk /dev/hda

The number of cylinders for this disk is set to 2434.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., 0ld versions of LILO)
2) booting and partitioning software from other OSs
  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

The exact response will vary, depending on your system. If you enter an "m" you will get a list of all the commands you can enter, as follows:
Code Sample
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help):

I want to create a 1.2 Gig partition that I will later use as a swap partition, To do this, I use the "n" command as follows:
Code Sample
Command (m for help): n

The system will then ask me whether I want to create a primary or extended partition. I won't explain the difference here, but since I'm only going to have 4 partitions on the drive, I choose "p" for primary. The system then asks me for a partition number, and I enter "3", which is the logical next partition. At this point, my screen should look like this:
Code Sample
Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
p

Partition number (1-4): 3
First cylinder (1659-2434, default 1659):

Since I want to start this partition right after the previous one, I enter "1659". I could also just press the "enter" key, and the effect would be the same.
Now the system asks how much space to allocate for this partition. I want 1.2 Gig for this one, so following the propmt, I enter "+1200M". This gets me back to the fdisk command prompt. Just to make sure that all went as planned, lets use the "p" command to print the partition table. This is what you will see:
Code Sample
Partition number (1-4): 3
First cylinder (1659-2434, default 1659): 1659
Last cylinder or +size or +sizeM or +sizeK (1659-2434, default 2434): +1200M

Command (m for help): p

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *           1         383     3076416    b  Win95 FAT32
/dev/hda2             384        1658    10241437+   c  Win95 FAT32 (LBA)
/dev/hda3            1659        1805     1180777+  83  Linux

Command (m for help):

As you can see, the new partition has been added, starting at cylinder 1659, and ending at cylinder 1805, and has been created as a type 83 (Linux) partition.

For the next partition, we want to use all the remaining space on the hard drive, so we will repeat the above procedure with two exceptions. First, since we are creating another primary partition, and only 4 primary partitions are allowed, the system will not ask us for a partition number, but will automatically assign the only remaining one. Second, we need not specify any values for the first cylinder or last cylinder, since the defaults will assign all the remaining space on the drive. The example below shows what our terminal window should look like after we do this.
Code Sample
Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
p

Selected partition 4
First cylinder (1806-2434, default 1806):
Last cylinder or +size or +sizeM or +sizeK (1806-2434, default 2434):
Using default value 2434

Command (m for help): p

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *           1         383     3076416    b  Win95 FAT32
/dev/hda2             384        1658    10241437+   c  Win95 FAT32 (LBA)
/dev/hda3            1659        1805     1180777+  83  Linux
/dev/hda4            1806        2434     5052442+  83  Linux

Command (m for help):

Finally, we want to change /dev/hda3 to a linux swap partition. The command for this is "t". As soon as you enter this command, the system asks you for the partition number. You enter the number of the partition you want to change, and the system asks for the hex code for the partition type you want to assign to that partition. You can get a list of partition types by entering a "L". The type for a Linux swap partition is 82, so enter "82" and the system will confirm that your request has been carried out. Enter "p" again, and you will see the following, indicating that /dev/hda3 has indeed been changed.
Code Sample
Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 82
Changed system type of partition 3 to 82 (Linux swap)

Command (m for help): p

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *           1         383     3076416    b  Win95 FAT32
/dev/hda2             384        1658    10241437+   c  Win95 FAT32 (LBA)
/dev/hda3            1659        1805     1180777+  82  Linux swap
/dev/hda4            1806        2434     5052442+  83  Linux

Command (m for help):

All the hard work has now been done. At this point, nothing has actually been written to the hard drive. If you want your changes to take effect, you must enter the "w" command, which will write the new partition table to disk, and then exit. Once you enter the "w", you will see disk activity. It may be necessary to restart the computer to get the partitions set up.
Back to top
Profile PM 
1 replies since May 01 2007,15:10 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Make MyDSL Remaster with DSL V3.3Now, I've decided

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code