Linux.com

Community Blogs



Mageia Linux

I installed the 64 bit version of Mageia, on a 500 gig HD. It was the only OS on the disk. I had tried the 32 bit CD, but had multiple problems, and after posting on the forums was advised to try the 64 bit DVD. The install was almost identical to Mandriva, and like Mandriva, I had to find, and install the correct, proprietary driver for my Nvidia 8400 GS card. I then proceeded to download, a few graphic intense games. The first game I tried to play would not even load. As I recall, this was one of the reasons I left Mandriva, and switched to PCLOS. I discovered several applications which would not load also. There are a few things that are annoying about this distribution, but nothing that would  prevent me from installing it again, once they have  some of the rough edges smoothed out. I have never been a fan of their software installer, plus the repositories were not loaded automatically. I had to set up the internet connection after the install, manually. Never did get my Netgear USB wireless device to connect. They have some of the best people from Mandriva working on it, and I'm sure they can fix the minor problems. I didn't find it good enough to replace Mint, Peppermint2, PCLOS. The specs on my machine are: MSI 760GM-E51 mobo, AMD 640 quad core processor, 600 watt power supply, 16 gig DDR3, 1.5 TB HD, Nvidia 8400GS, 512 meg video card, and a 500 gig HD, which I use for testing different distributions.

 

openSUSE Weekly News 180 is out!

We are pleased to announce the openSUSE Weekly News, Issue 180.

In this Issue:

  • openSUSE Conference and RW sessions – the BoF
  • Google Summer of Code Reports
  • TechRepublic/Jack Wallen: Five tips for collaborating in LibreOffice
  • Jos Poortvliet: openSUSE and online services
  • and many more ...

You can download it there:

We hope you enjoy the reading :-)

If you want to help us collecting interesting articles for the openSUSE Weekly News, so you can all your stuff into our new ietherpad: http://os-news.ietherpad.com/2.

Found Bugs? Please place it in our Bugtracker: http://developer.berlios.de/bugs/?group_id=12095

Features, Ideas and Improvements can placed in our Featuretracker: http://developer.berlios.de/feature/?group_id=12095

Older content can be found there.

Flattr this

 

Create a custom distro: building a minimal image

Building a minimal image

With lessons learned from previous chapters here we go again with the first step for building a minimal image of our newly created Linux distribution, it ain't that difficult and it helps to understand the Slax customization process. In this article we'll build our own slax rebuild with the minimal footprint, path and configurations are taken from the same virtual machine and from previous path locations.

Path

As already set up under the “target” directory there's our environment, if you've followed previous articles you may want a copy of our previous tests:

 

root@slax:~/target# cp -R image image.full
root@slax:~/target# ls -la
total 20
drwxr-xr-x 5 root root 4096 Jun 17 14:02 ./
drwxr-xr-x 14 root root 4096 Jun 8 18:33 ../
drwxr-xr-x 4 root root 4096 May 30 17:35 image/
drwxr-xr-x 4 root root 4096 Jun 17 14:02 image.full/
drwxr-xr-x 2 root root 4096 May 30 17:44 iso/

Deleting unneeded packages

 

Slax customization process is really easy, as you can see you've two directories:

 

root@slax:~/target/image# ls -la
total 16
drwxr-xr-x 4 root root 4096 May 30 17:35 ./
drwxr-xr-x 5 root root 4096 Jun 17 14:02 ../
dr-xr-xr-x 6 root root 4096 May 30 17:35 boot/
dr-xr-xr-x 7 root root 4096 May 30 17:35 slax/

inside the boot directory there're files related to OS boot as usual, you may boot it from a CD/HD/USB Stick, no matter about the file system, SLAX supports Linux/Unix file systems (EXT2/3/..., XFS, JFS, …) and Windows FAT16/32 as well, you only need to use the right tool to install the boot loader in the MBR (with syslinux or lilo) as previously explained here
Inside slax directory there're a lot of interesting things:

root@slax:~/target/image/slax# ls -la
total 136
dr-xr-xr-x 7 root root 4096 May 30 17:35 ./
drwxr-xr-x 4 root root 4096 May 30 17:35 ../
-rw-r--r-- 1 root root 17993 May 30 17:35 GNU_GPL
-r--r--r-- 1 root root 459 May 30 17:35 LICENSE
drwxr-xr-x 2 root root 4096 May 30 17:35 base/
-rw-r--r-- 1 root root 35016 May 30 17:35 changelog.txt
-rw-r--r-- 1 root root 4780 May 30 17:35 cheatcodes.txt
-rw-r--r-- 1 root root 437 May 30 17:35 livecd.sgn
-rwxr-xr-x 1 root root 658 May 30 17:35 make_iso.bat*
-rwxr-xr-x 1 root root 932 May 30 17:35 make_iso.sh*
dr-xr-xr-x 2 root root 4096 Jun 17 14:03 modules/
drwxr-xr-x 2 root root 4096 May 30 17:35 optional/
-rw-r--r-- 1 root root 959 May 30 17:35 requirements.txt
drwxr-xr-x 2 root root 4096 May 30 17:35 rootcopy/
-rw-r--r-- 1 root root 21584 May 30 17:35 slaxsave.zip
drwxr-xr-x 3 root root 4096 May 30 17:35 tools/

LICENSE, GNU_GPL, *.txt files are license files and changelogs related to this system, leave them there to keep the GPL license. “livecd.sgn” is a signature file created from slax to identify itself, leave it where it is or your system won't boot (a script checks it during the boot process). “make_iso*” files are not necessary for our new system, we do customization on slax from a build machine so you may delete them without troubles. slaxsave.zip is not needed now, it's just a bunch of compressed xfs filesystem images used when you do customizations with loop devices, you can delete it.
Now let's analyze these directories:

base/

contains core modules for a slax boot, you may even leave it empty if you put your main modules into the “modules” directory

modules/

after the boot your system will load every module available inside this directory, you may even put core modules here, later on you'll see something more about modules

optional/

if you want to load a particular module only when you want it and you don't want to have it automatically loaded inside your system tree this is the place where you can put your own modules

rootcopy/

“/” root file system copy, you may add tweaks or customization scripts here, we'll see this dir deeply later on

tools/

bash script, utilities and various customization tools used inside slax (module loading/unloading, creation, activation, …)

now inside ~/target/image/slax/modules directory remove everything except 1-001-core.lzm module, this is the core module with a basic system inside it, I always add even the SSHD module because I'd like to connect to my remote machines with ssh. SSHD module is really thin, just 4kb so it could be a pity to remove it from your machine, here's the overall result:

root@slax:~/target/image/slax# ls -la modules/
total 49384
dr-xr-xr-x 2 root root 4096 Jun 17 14:03 ./
dr-xr-xr-x 7 root root 4096 May 30 17:35 ../
-rw-r--r-- 1 root root 50499584 May 30 17:35 1-001-core.lzm
-rw------- 1 root root 4096 May 30 17:35 618-sshd-activate.lzm
root@slax:~/target/image/slax# ls -la base/
total 8
drwxr-xr-x 2 root root 4096 May 30 17:35 ./
dr-xr-xr-x 7 root root 4096 May 30 17:35 ../
root@slax:~/target/image/slax# ls -la optional/
total 8
drwxr-xr-x 2 root root 4096 May 30 17:35 ./
dr-xr-xr-x 7 root root 4096 May 30 17:35 ../
root@slax:~/target/image/slax# ls -la rootcopy/
total 8
drwxr-xr-x 2 root root 4096 May 30 17:35 ./
dr-xr-xr-x 7 root root 4096 May 30 17:35 ../

as you can see there're just the file 1-001-core.lzm and the 618-sshd-activate.lzm module, about 50Mb for everything. You may even remove sshd if you don't want it. No matter about other directories, clean everything for a minimal image

Build it !

Now you can build your new minimal image with this command:

root@slax:~/target# /root/target/image/slax/make_iso.sh /root/target/iso/image.iso


or you can use the script called “make.iso” listed in my previous article (basically a wrapper of the above command), here's the result

root@slax:~/target# ./make.iso
2.01.01a53 (i686-pc-linux-gnu)
Scanning ../.
Scanning .././boot
Scanning .././boot/dos
Scanning .././boot/isolinux
Excluded by match: .././boot/isolinux/isolinux.boot
Scanning .././boot/pxelinux.cfg
Scanning .././boot/pxelinux.cfg/web
Scanning .././boot/pxelinux.cfg/web/conf
Scanning .././boot/syslinux
Scanning .././slax
Scanning .././slax/base
Scanning .././slax/modules
Scanning .././slax/optional
Scanning .././slax/rootcopy
Scanning .././slax/tools
Scanning .././slax/tools/WIN
Writing: Initial Padblock Start Block 0
Done with: Initial Padblock Block(s) 16
Writing: Primary Volume Descriptor Start Block 16
Done with: Primary Volume Descriptor Block(s) 1
Writing: Eltorito Volume Descriptor Start Block 17
Size of boot image is 4 sectors -> No emulation
Done with: Eltorito Volume Descriptor Block(s) 1
Writing: Joliet Volume Descriptor Start Block 18
Done with: Joliet Volume Descriptor Block(s) 1
Writing: End Volume Descriptor Start Block 19
Done with: End Volume Descriptor Block(s) 1
Writing: Version block Start Block 20
Done with: Version block Block(s) 1
Writing: Path table Start Block 21
Done with: Path table Block(s) 4
Writing: Joliet path table Start Block 25
Done with: Joliet path table Block(s) 4
Writing: Directory tree Start Block 29
Done with: Directory tree Block(s) 17
Writing: Joliet directory tree Start Block 46
Done with: Joliet directory tree Block(s) 15
Writing: Directory tree cleanup Start Block 61
Done with: Directory tree cleanup Block(s) 0
Writing: Extension record Start Block 61
Done with: Extension record Block(s) 1
Writing: The File(s) Start Block 62
17.24% done, estimate finish Fri Jun 17 14:09:51 2011
34.41% done, estimate finish Fri Jun 17 14:09:51 2011
51.63% done, estimate finish Fri Jun 17 14:09:51 2011
68.80% done, estimate finish Fri Jun 17 14:09:51 2011
86.03% done, estimate finish Fri Jun 17 14:09:52 2011
Total translation table size: 2048
Total rockridge attributes bytes: 8867
Total directory bytes: 32768
Path table size(bytes): 208
Done with: The File(s) Block(s) 28862
Writing: Ending Padblock Start Block 28924
Done with: Ending Padblock Block(s) 150
Max brk space used 21000
29074 extents written (56 MB)

Now you've a new minimal slax build in less than 60Mb !

root@slax:~/target# ls -la iso/
total 58220
drwxr-xr-x 2 root root 4096 Jun 17 14:10 ./
drwxr-xr-x 5 root root 4096 Jun 17 14:08 ../
-rw-r--r-- 1 root root 59543552 Jun 17 20:00 image.iso

As usual feel free to comment or add your suggestion to the article if you need it

 

Previous Chapters

 

As usual let me know your thoughts and drop a note below if you want


Have fun
Ben

 

RPM Commands

RPM package is a powerful utility to manage the software in all major Linux distributions.  RPMs can be used to,

  • Install packages
  • Remove packages
  • Upgrade packages
  • Verify packages

Here are some useful command to manage RPM packages,

Read more... Comment (0)
 

64 bit sytem versus Mint Linux

I built a new system  on May 6th,2011. MSI 760GM-E51 mobo, 600 watt power supply, AMD 640, quad core processor, 16 gigs DDR3 ram, and 2- 500 hundred gig HD's. I attempted to install the 64 bit version of Linux Mint 11 on it. It did not give me an option to install to sdb, only showed sda. I had a copy of Ubuntu Studio handy, so I loaded it up and tried to install it. It showed sdb, so I installed it, no problem. Not really a fan of Ubuntu, so I resized the partition and tried Linux Mint 11 again. this time it showed sdb, so I started the install. It got about halfway, on the progress bar, and everything locked up. No mouse, keyboard, nothing. Checked the md5 sum, everything checked out okay. Thought maybe I had a bad burn, so I downloaded from another mirror, burned it at 8x, slowest speed on my burner, but the same thing happened again. In total, I have tried 15 DVD's, and 2 CD's and Mint 11 just will not install on this system. There must be something in the setup, on this machine, that Mint 11 doesn't like.

    Yesterday I downloaded the live CD of the newly released Mageia 1, 32 bit. Installed it , but encountered a few problems afterwards. Got on their forum and one of the members suggested I try the 64 bit DVD. So, I downloaded the DVD, installed it without a hitch. Runs great. Had a problem with the sound, but it turned out to be an easy fix. So far it has run flawlessly, and is much faster, and better than the last Mandriva I tried.

     My first encounter with Linux was Mandrake 7.2, back in 2001. I had ran windows since 1991, and Commodores since 1981. Just got tired of all the windows errors, viruses, adware, malware, and having to reinstall about every 6 months.. Now windows is a game only OS, I don't trust it for online banking, e-mail, or general surfing, especially combined with IE. I use Firefox exclusively. I have 4 desktops, and 2 laptops currently in use, and use a variety of distros. My main system has Mint 10, Peppermint One, Kububtu, (seldom used), and XP for games. My Netbook runs PCLinuxOS, and my laptop runs PCLinuxOS, and Peppermint One. The new system has Xp,(older games) Win7, (newer games) PCLinuxOS, Peppermint One, and Mageia1. My 2 grandsons are the main player of games, when my wife isn't on it.

 

Create a custom distro: Create your first image (USB)

I've just received two messages with the same question related to my previous article Create your first ISO image: "Is there a way to create an USB stick with it ?". Short answer is: "Yes, there's  script to do it" but if you're still reading you may want more information. Here's what you might do if you want to create a bootable USB stick from your virtual slax build machine.

I'm still referring to my previous article: "Create a custom distro: Create your first ISO image", path and directories are still the same

Take a look at the source !

The creation of a bootable USB stick is not a mess, it's quite simple, if you take a closer look to "bootinst.sh" script located into the /boot directory you might understand what you can do with it but if you're lazy or you want to have more automation you may use the script listed below, I've created it for personal purposes but it's basically a wrapper of bootinst.sh. 

Let's keep the same virtual machine, same paths and locations, just place a script in the same dir where you've placed the script for creating the ISO image for CDs (/root/target/).

#!/bin/bash
# This script builds an ISO file from the image created
BASEPATH=/mnt/sda1/target
TARGET=/dev/sdb1
MOUNTPOINT=/mnt/sdb

echo "Mounting and formatting the USB Stick"
mkdir -p $MOUNTPOINT
umount $TARGET 2>/dev/null
mkfs.ext2 $TARGET -m 0
# Device not found or not mounted
if [[ $? -ne 0 ]]; then
    echo -e "TARGET USB DEVICE NOT FOUND, INSTALLATION FAILED !!"
    exit
fi
mount $TARGET $MOUNTPOINT
echo -e "Generating `du -kLs image` size"
echo "Copying contents into the USB Stick..."
cp -Rd $BASEPATH/image/* $MOUNTPOINT/
$MOUNTPOINT/boot/liloinst.sh
echo -e "Target disk size"
df $TARGET
umount $TARGET
echo -e  "Installation Completed"

This script is very simple but just to be clear here's what it does:

  1. Create the mount point for your usb stick
  2. Format the usb stick (ext2 is sufficient but you may use something else)
  3. Mount your usb drive
  4. Copy the contents with your new image in it
  5. Add lilo to make it bootable

In my virtual environment /dev/sda is my primary virtual hard disk, take a look at previous article for path usage, /dev/sdb is what VMWare uses when I connect an USB stick to the virtual machine. Before running this script make some checks in your current system, as you can see it's a batch script to format and wipe sdb internal contents, so you've been warned !

If you're inside my virtual environment you don't need to worry about it

liloinst.sh script is smart enough to understand where it resides and it applies lilo in the MBR of the mounted drive.

There's a lot of space for improvements so if you modify it or automate the script a little bit more just drop me few notes or send me your version and I'll modify and republish it for the community

As usual feel free to contribute with your comments

 

Previous step:

Create a custom distro: Create your first ISO image (CD)

Next step:

Create a bare bone machine with minimal footprint and requirements

 

Create a custom distro: Create your first ISO image

We finally have our own build machine, SLAX fully loaded, system up and running (in a virtual environment) so we can make a lot of tests with it.

Now it's time to create the first image, it's just a matter of minutes.

 

Preparation

When the login screen comes around you may enter in your system with the root user, “toor” is the default password with SLAX unless you change it, /etc/issue is reporting a lot of useful information for newbies as well (root/toor, xconf, startx, …)

 

Now in less than 5 minutes you'll be able to create your new virtual machine, let's create a simple environment:

root@slax:~# mkdir target target/image target/iso
root@slax:~# cd target/image/

Now it's time to copy the contents of your build machine into your target host space:

root@slax:~/target/image# cp /mnt/sda1/boot . -R
root@slax:~/target/image# cp /mnt/sda1/slax . -R
root@slax:~/target/image# ls -la
total 16
drwxr-xr-x 4 root root 4096 May 30 17:35 ./
drwxr-xr-x 3 root root 4096 May 30 17:33 ../
dr-xr-xr-x 6 root root 4096 May 30 17:35 boot/
dr-xr-xr-x 7 root root 4096 May 30 17:35 slax/

Where /mnt/sda1/ is my root partition, if you've followed my previous article you may have the same device name, expecially if you've installed it in a virtual host (I'm using VMWare), if you're not under /mnt/sda1 you may discover your root partition name, it ain't that difficult:

root@slax:~/target/image# df
Filesystem 1K-blocks Used Available Use% Mounted on
aufs 7115576 631668 6122448 10% /
tmpfs 255440 0 255440 0% /dev/shm
/dev/sda1 7115576 631668 6122448 10% /mnt/sda1

 

Now in your target directory you've the essential structure of your new target device

 

root@slax:~/target/image# ls -la
total 16
drwxr-xr-x 4 root root 4096 May 30 17:35 ./
drwxr-xr-x 3 root root 4096 May 30 17:33 ../
dr-xr-xr-x 6 root root 4096 May 30 17:35 boot/
dr-xr-xr-x 7 root root 4096 May 30 17:35 slax/

This is just what you need to create your new target system

 

 

 

Creating a target ISO

to create a target ISO with an exact copy of your system you only need to use a ready made script file located under target/image/slax directory, invocation is straightforward:

root@slax:~/target# ./image/slax/make_iso.sh iso/mycoolimage.iso
2.01.01a53 (i686-pc-linux-gnu)
Scanning ../.
Scanning .././boot
Scanning .././boot/dos
Scanning .././boot/isolinux
Excluded by match: .././boot/isolinux/isolinux.boot
Scanning .././boot/pxelinux.cfg
Scanning .././boot/pxelinux.cfg/web
Scanning .././boot/pxelinux.cfg/web/conf
Scanning .././boot/syslinux
Scanning .././slax
Scanning .././slax/base
Scanning .././slax/modules
Scanning .././slax/optional
Scanning .././slax/rootcopy
Scanning .././slax/tools
Scanning .././slax/tools/WIN
Writing: Initial Padblock Start Block 0
Done with: Initial Padblock Block(s) 16
Writing: Primary Volume Descriptor Start Block 16
Done with: Primary Volume Descriptor Block(s) 1
Writing: Eltorito Volume Descriptor Start Block 17
Size of boot image is 4 sectors -> No emulation
Done with: Eltorito Volume Descriptor Block(s) 1
Writing: Joliet Volume Descriptor Start Block 18
Done with: Joliet Volume Descriptor Block(s) 1
Writing: End Volume Descriptor Start Block 19
Done with: End Volume Descriptor Block(s) 1
Writing: Version block Start Block 20
Done with: Version block Block(s) 1
Writing: Path table Start Block 21
Done with: Path table Block(s) 4
Writing: Joliet path table Start Block 25
Done with: Joliet path table Block(s) 4
Writing: Directory tree Start Block 29
Done with: Directory tree Block(s) 17
Writing: Joliet directory tree Start Block 46
Done with: Joliet directory tree Block(s) 15
Writing: Directory tree cleanup Start Block 61
Done with: Directory tree cleanup Block(s) 0
Writing: Extension record Start Block 61
Done with: Extension record Block(s) 1
Writing: The File(s) Start Block 62
4.89% done, estimate finish Mon May 30 17:44:43 2011
9.77% done, estimate finish Mon May 30 17:44:43 2011
14.65% done, estimate finish Mon May 30 17:44:43 2011
19.53% done, estimate finish Mon May 30 17:44:43 2011
24.42% done, estimate finish Mon May 30 17:44:43 2011
29.29% done, estimate finish Mon May 30 17:44:43 2011
34.18% done, estimate finish Mon May 30 17:44:45 2011
39.05% done, estimate finish Mon May 30 17:44:45 2011
43.94% done, estimate finish Mon May 30 17:44:45 2011
48.82% done, estimate finish Mon May 30 17:44:45 2011
53.71% done, estimate finish Mon May 30 17:44:44 2011
58.58% done, estimate finish Mon May 30 17:44:44 2011
63.47% done, estimate finish Mon May 30 17:44:44 2011
68.34% done, estimate finish Mon May 30 17:44:44 2011
73.22% done, estimate finish Mon May 30 17:44:44 2011
78.11% done, estimate finish Mon May 30 17:44:44 2011
82.99% done, estimate finish Mon May 30 17:44:44 2011
87.86% done, estimate finish Mon May 30 17:44:44 2011
92.75% done, estimate finish Mon May 30 17:44:44 2011
97.64% done, estimate finish Mon May 30 17:44:45 2011
Total translation table size: 2048
Total rockridge attributes bytes: 9444
Total directory bytes: 32768
Path table size(bytes): 208
Done with: The File(s) Block(s) 102222
Writing: Ending Padblock Start Block 102284
Done with: Ending Padblock Block(s) 150
Max brk space used 21000
102434 extents written (200 MB)

And that's it, you now have a file called mycoolimage.iso under the iso directory

 

root@slax:~/target# ls -la iso/
total 205084
drwxr-xr-x 2 root root 4096 May 30 17:44 ./
drwxr-xr-x 4 root root 4096 May 30 17:36 ../
-rw-r--r-- 1 root root 209784832 May 30 17:44 mycoolimage.iso

you may create a little script if you want to automate the whole process:

#!/bin/bash
# This script builds an ISO file from the image created
BASEPATH=/mnt/sda1/target
REMOTEHOST=192.168.84.1

mkdir -p $BASEPATH/iso
$BASEPATH/image/slax/make_iso.sh $BASEPATH/iso/image.iso
scp $BASEPATH/iso/image.iso ben@$REMOTEHOST:/iso/image.iso

p { margin-bottom: 0.08in; }

To make my own tests I've two virtual machines, one it's called “Slax Build Machine”, one it's called “Slax Test Machine”. “Slax Build Machine” is the machine we're now using and the same machine we've built in the previous chapter. “Slax Test Machine” it's an empty VMWare virtual machine, no hard drives, just a virtual cdrom device pointing to an ISO file located on the real host (in the directory /tmp/image.iso). When I'd like to make some tests I just need to create an ISO file (in the build machine with the previous script). The script copies the .ISO image in the physical host after the creation, then I start the Test Machine when needed, I don't need to waste CDs or reinstall/configure the virtual machine each time, it's really easy

 

In this chapter we've just created an identical copy of our build machine, in the next chapter we'll customize the test machine, we'll start with a bare bone system and we'll add modules/functionalities later on

I guess this phase is really easy but it's important to understand it well, from the next phase you'll understand why customizing and building a slax machine is really easy and powerful

 

Previous Chapters

Next Chapters

 

As usual let me know your thoughts and drop a note below if you want

 

Andrea (Ben) Benini

 

 

 

 

openSUSE Weekly News 176 is out!

We are pleased to announce our openSUSE Weekly News Issue 176.

In this Issue:

  • openSUSE Conference 2011 to be creative and open!
  • Manu Gupta: My GSoC Project – SaX3
  • Linux Tag 2011
  • Will Stephenson: Have you BURPed yet today?
  • and many more ...

You can download it there:

We hope you enjoy the reading :-)

If you want to help us collecting interesting articles for the openSUSE Weekly News, so you can all your stuff into our new ietherpad: http://os-news.ietherpad.com/2.

Found Bugs? Please place it in our Bugtracker: http://developer.berlios.de/bugs/?group_id=12095

Features, Ideas and Improvements can placed in our Featuretracker: http://developer.berlios.de/feature/?group_id=12095

Older content can be found there.

Flattr this

 

Create a custom distro: building the build machine (p.2)

This page follows from: Create a custom distro: building the build machine (p.1)

 

Installation Process

The first thing to do is to partition the virtual hard drive, fdisk is my favorite tool and you'll be able to create a boot disk quickly:

root@slax:~# fdisk /dev/sda[ENTER]

The number of cylinders for this disk is set to 1044.
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., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n[ENTER]
Command action
e extended
p primary partition (1-4)
p[ENTER]
Partition number (1-4): 1[ENTER]
First cylinder (1-1044, default 1): [ENTER]
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044): 900[ENTER]

Command (m for help): n[ENTER]
Command action
e extended
p primary partition (1-4)
p[ENTER]
Partition number (1-4): 2[ENTER]
First cylinder (901-1044, default 901): [ENTER]
Using default value 901
Last cylinder, +cylinders or +size{K,M,G} (901-1044, default 1044): [ENTER]
Using default value 1044

Command (m for help): t[ENTER]
Partition number (1-4): 2[ENTER]
Hex code (type L to list codes): 82[ENTER]
Changed system type of partition 2 to 82 (Linux swap)

Command (m for help): a[ENTER]
Partition number (1-4): 1[ENTER]

Command (m for help): p[ENTER]

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x17159cab

Device Boot Start End Blocks Id System
/dev/sda1 * 1 900 7229218+ 83 Linux
/dev/sda2 901 1044 1156680 82 Linux swap

Command (m for help): w[ENTER]
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@slax:~#

 

 

Now you've a drive with two partitions (resize them according to your needs), let's format them:

 

root@slax:~# mkfs.ext2 /dev/sda1[ENTER]
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
452480 inodes, 1807304 blocks
90365 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1853882368
56 block groups
32768 blocks per group, 32768 fragments per group
8080 inodes per group
Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@slax:~# mkswap /dev/sda2[ENTER]
Setting up swapspace version 1, size = 1156676 KiB
no label, UUID=1bbc1448-eef5-4faf-874b-f6d9f873459d
root@slax:~# swapon /dev/sda2[ENTER]
root@slax:~# free[ENTER]
total used free shared buffers cached
Mem: 510880 272320 238560 0 38944 183456
-/+ buffers/cache: 49920 460960
Swap: 1156672 0 1156672
root@slax:~#

Now it's time mount the target drive into your system:

root@slax:~# mkdir /mnt/sda1[ENTER]
root@slax:~# mount /dev/sda1 /mnt/sda1[ENTER]
root@slax:~# df[ENTER]
Filesystem 1K-blocks Used Available Use% Mounted on
aufs 306528 916 305612 1% /
tmpfs 255440 0 255440 0% /dev/shm
/dev/hdc 204850 204850 0 100% /mnt/hdc
/dev/sda1 7115576 15900 6738216 1% /mnt/sda1

 

As you can see my virtual appliance mapped my virtual CD-ROM unit as /dev/hdc, please change your settings according to your virtualization software if needed because it's time to enter into the CD-ROM root and copy everything in the virtual hard disk, here's:

 

root@slax:~# cd /mnt/hdc/[ENTER]
root@slax:/mnt/hdc# ls -la[ENTER]
total 10
drwxr-xr-x 4 root root 2048 Aug 4 2009 ./
drwxr-xr-x 5 root root 100 May 20 12:59 ../
dr-xr-xr-x 6 apache apache 4096 May 20 10:31 boot/
dr-xr-xr-x 7 apache apache 4096 May 20 10:31 slax/
root@slax:/mnt/hdc# cp -R * ../sda1/[ENTER]

I've just copied the entire content of the Slax CD-ROM drive in the hard disk, now we only need to install LILO to have a bootable hard disk.

Enter into your hard drive location and issue the liloinst.sh command, it's fairly simple to understand what it does, by the way this script will explain you what it's for and asks you to read few messages to continue the installation

 

root@slax:/mnt/hdc# cd ../sda1/[ENTER]
root@slax:/mnt/sda1# ./boot/liloinst.sh[ENTER]

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Welcome to Slax boot installer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This installer will setup disk /dev/sda to boot only Slax from /dev/sda1.
Warning! Master boot record (MBR) of /dev/sda will be overwritten.
If you use /dev/sda to boot any existing operating system, it will not work
anymore. Only Slax will boot from this device. Be careful!

Press any key to continue, or Ctrl+C to abort...[ENTER]





Flushing filesystem buffers, this may take a while...
Updating MBR to setup boot record...
Warning: The initial RAM disk is too big to fit between the kernel and
the 15M-16M memory hole. It will be loaded in the highest memory as
though the configuration file specified "large-memory" and it will
be assumed that the BIOS supports memory moves above 16M.
Added Slax ? *
Disk /dev/sda should be bootable now. Installation finished.

Read the information above and then press any key to exit...[ENTER]

root@slax:/mnt/sda1#

 

 

We did it. Now your machine is fully bootable and ready to go, power off the system and remove your virtual CD-ROM from VMWare configuration menu, it's not needed anymore.

Next step will prepare your new build machine to host a “simple binary toolchain”, with it you'll be able to create appliances and understand Slax configuration as well

As normal just drop me a note if you'd like to have information about it or if you'd like to have more details on what I've done

 

Previous Chapters

Next Chapters

 

Andrea (Ben) Benini

 

Create a custom distro: building the build machine (p.1)

Introduction

Back again with a new episode of my favorite saga: Creating a custom live distro for a special appliance, if you've read all the introduction articles (this link goes to the summary) you may know that now it's time to go deep with some serious stuff. As I told you before in previous episodes I've taken SLAX as my base due to its marvelous features if you need to deal with custom distro like me.

What I'll do now it's to create “the building machine”, from there you'll create new distros and explore its powerful features: create new packages, install them, do some custom stuff and so on.

 

 

Download

 

The first thing to do is obviously download an ISO from their site (http://www.slax.org), you may add or remove your favorite software from the basic installation, if you visit the site for a while you'll notice how simple is to get something from them, for this example and this custom build machine it's not necessary to download additional software, just grab the ready made slax machine as it is, it's about 200Mb so it's not that big. In the download area get the ISO image, we'll use it to install our machine.

 

Create the Machine

Now to work in a clean environment I'll create a virtual build machine and I'll install Slax there, you don't need to worry about your host operating system, this build machine is a virtual appliance so you may move or use it wherever you want. I've used VMWare because that's what I use more often, obviously you may create your own machine with your favorite virtualization software. If you're lazy and you don't even want to create your machine, you may ask me a clean Slax build machine. I don't have a web space online for 200Mb, if you can supply me something I'll publish this machine for free in that area

Now this virtual machine has just basic components: CPU, memory (512Mb), CD-ROM, hard disk, nothing more is required for a basic startup.

  • Memory is not an huge problem, our Slax will run even on memory constrained systems, my choice is to use 512Mb of ram
  • CD-ROM needs to be mapped to your fresh ISO just downloaded from Slax site, you don't need to burn a CD for a virtual machine (even if is up to you to decide what to do), after your final installation you may remove the CD-ROM device, we'll install Slax in a virtual hard drive 
  • Hard Disk, just take a standard 8Gb virtual disk, even if Slax will never use it all

 

 

 

Here's a screenshot from my VMWare Player with my basic startup configuration

 

First Boot

Now power on your virtual machine, we'll install the exact image contained into the CD-ROM in our hard drive. After the boot you'll see Slax splash screen, just select “text only boot mode”, we don't need XWindow now

Wait for a while until you'll see your login and type “root” as username and password “toor” as reported in the welcome message; now you'll see the prompt and you're ready for your clean install.

 

 

In the next page there's the installation process

 

 

 

 

 

 

 

openSUSE Weekly News 175 is out!

We are pleased to announce the new openSUSE Weekly News Issue 175!

In this Issue:

  • openSUSE 11.2 has reached end of SUSE support - 11.2 Evergreen goes on!
  • Sebastian Kügler: What’s new in Plasma Active?
  • Thanasis Rous: Medical Report
  • ZDNet/Steven J. Vaughan-Nichols: Novell will continue to support LibreOffice
  • and many more ...

You can download it there:

We hope you enjoy the reading :-)

If you want to help us collecting interesting articles for the openSUSE Weekly News, so you can all your stuff into our new ietherpad: http://os-news.ietherpad.com/2.

Found Bugs? Please place it in our Bugtracker: http://developer.berlios.de/bugs/?group_id=12095

Features, Ideas and Improvements can placed in our Featuretracker: http://developer.berlios.de/feature/?group_id=12095

Older content can be found there.

Flattr this

 
Page 4 of 17

Upcoming Linux Foundation Courses

  1. LFS220 Linux System Administration
    22 Sep » 25 Sep - Virtual
    Details
  2. LFD211 Introduction to Linux for Developers
    06 Oct » 07 Oct - Virtual
    Details
  3. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board