Friday, March 12, 2004

Mandrake Linux tips for free: "This page describes the installation I did with the 4cd Mandrake Linux 10.0 Community Edition set."
Linux Man Page for RESIZE2FS (8): "SYNOPSIS
resize2fs [ -d debug-flags ] [ -f ] [ -F ] [ -p ] device [ size ]
DESCRIPTION
The resize2fs program will resize ext2 file systems. It can be used to enlarge or shrink an ext2 file system located on device so that it will have size blocks. If the size parameter is not specified, it will default to the size of the partition. The size parameter may never be larger than the size of the partition.
The resize2fs program does not manipulate the size of partitions. If you wish to enlarge a filesystem, you must first make sure you can expand the size of the underlying partition first. This can be done using fdisk (8) by deleting the partition and recreating it with a larger size. When recreating the partition, make sure you create it with the same starting disk cylinder as before! Otherwise, the resize operation will certainly not work, and you may lose your entire filesystem.
If you wish to shrink an ext2 partition, first use resize2fs to shrink the size of filesystem. Then you may use fdisk (8) to shrink the size of the partition. When shrinking the size of the partition, make sure you do not make it smaller than the new size of the ext2 filesystem!
OPTIONS
-d debug-flags
Turns on various resize2fs debugging features, if they have been compiled into the binary. debug-flags should be computed by adding the numbers of the desired features from the following list: \ 1\ -\ Print out all disk I/O \ 2\ -\ Debug block relocations \ 8\ -\ Debug inode relocations \ 16\ -\ Debug moving the inode table
-p
Prints out a percentage completion bars for each resize2fs operation, so that the user can keep track of what the program is doing.
-f
Forces resize2fs to proceed with the filesystem resize operation, overriding some safety checks which resize2f"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 6: Test the installation"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Update the bootloader. In my case, this was:
bash-2.05# /sbin/lilo
Added linux *
Added knoppix
Added win2k
bash-2.05#"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 5: Update the bootloader (LILO)"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Here's an extract of my own LILO configuration. Your instructions will differ if you use something other than LILO.
image = /mnt/linux1/hardrive_boot/vmlinuz
label = knoppix
initrd = /mnt/linux1/hardrive_boot/miniroot.gz
read-only
root = /dev/hdc2
append = 'lang=us'"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 4: Make the partition bootable"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Copy the contents of the compressed kernel image from the CD. Mount the file /KNOPPIX/boot.img on a loop device and copy the contents from the device to /hardrive_boot/. I used these commands:
bash-2.05# /sbin/losetup /dev/loop0 /mnt/linux1/KNOPPIX/boot.img
bash-2.05# mount /dev/loop0 /mnt/floppy/
bash-2.05# cp /mnt/floppy/* /mnt/linux1/hardrive_boot"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 3: Copy the boot image"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Mount the newly created partition and create a directory named hardrive_boot.
Insert the Knoppix CD and, as root, copy the /KNOPPIX directory from the CD into the root directory of the partition.
Copy the following files from the CD to the root partition: autorun.bat, cdrom.ico, autorun.inf, and index.html. Remember to preserve the permissions as you copy everything over to the hard drive.
The left side of the panel in Figure 1 shows the CD's directory structure, while the right side shows the hard drive's partition."
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 2: Create the directory structure"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Step 1: Create a partition"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "You will need the following ingredients to bake your CD:
One Knoppix CD.
1GB of RAM: Don't worry if you don't have this much RAM; swap space will work just as well.
One PC with an existing Linux distribution installed and at least two partitions:
Partition 1, where you will develop the Knoppix CD. It must have at least 4GB of free space, although you'll need 5GB if you are short on RAM.
Partition 2, a 710MB empty partition.
The command-line utility create_compressed_fs, which can be copied from the Knoppix CD.
One kick list. This file lists packages that can be removed from the default distribution without 'breaking' dependencies.
Miscellaneous shell scripts: user-defined scripts facilitating development."
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "The Ingredients"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "You will need the following skills to customize the Knoppix Linux Live-CD:
You must be comfortable with the command line.
You must understand how to create partitions on your hard drive.
You must understand basic bash scripting.
You should be familiar with a Linux bootloader.
You must understand how to add swap memory (using the dd, mkswap, and swapon utilities), unless you have 1GB of RAM.
You should be comfortable installing, updating, and removing software packages using the Debian distribution of Linux."
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Your Required Knowledge Base"
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "The basic idea of making a Knoppix CD is to gather what you want on the CD by simulating it on the hard drive. You should be able to edit installed software and test your creation by rebooting the machine from the hard drive, via a bootloader, instead of wasting time burning it to a CD. This development environment mimics the CD, except it's significantly faster. Remember, this is not a standard Linux installation! Even though you are booting from the hard drive, you are in fact emulating an OS that is installed on a CD. When booted, the filesystem cannot be changed; it is read-only. "
LinuxDevCenter.com: Using and Customizing Knoppix [Nov. 20, 2003]: "Using and Customizing Knoppix"
O'Reilly Network: Knoppix: A Painless Introduction to Linux [Apr. 14, 2003]: "Knoppix: A Painless Introduction to Lin"