How could I take the server at work running mandrake and make it into a bootable cd?
How could I take the server at work running mandrake and make it into a bootable cd?
First of all. Make sure you really want to do do this. I spend 2 weeks (14 days) in trial and error, until i got it working. Secundley even if you follow those steps, you might not succed first time. Be prepared to spend time wondering why it don't work.
If you are still up to it, have fun. I know i did, when i got it right.
I have been told that mandrake are not so different from Redhat, so..
I did this with RedHat version 8, for a school project. where we wantet to make a firewall running on a cd-rom. Some of the following are rufley copyed and translated from my danish sa (i think it's called in english) and translated to english.
Here the roufley guide of how i got RH 8.0 on a bootable cd.
Thanks to the knoppix net distrubtion, to sort of show me how it's done
When you have your system just like you want it. Boot on a rescue disk.
Mount your partition / partitiosions. Then make a directory to contain your currend installetion.
I maid the directory /hdimg and used rsync to copy all the files to /hdimg
Then chroot into /hdimg You don't want to damage your current working installetion.Code:rsync -av --exclude /hdimg / /hdimg
Now you have to find the start up script who are resposebill for starting all the services. exaime the file /etc/inittab for a line who looks like this:
si::sysinit:/etc/rc.d/rc.sysinit
it is the script /etc/rc.d/rc.sysinit you have to modify.
You can chooice to put the commands into this file or call another script through rc.sysinit. I used the last option.
On redhat, the rc.sysinit script there are a line like this:
You have to place your script after this(or commands) if this line exist, otherwice they will be run twice, witch can do some wired things. I ended up with a 4 TB ramdrive, even through the computer only had 128 mb memoryCode:# Rerun ourselves through initlog if [ -z "$IN_INITLOG" -a -x /sbin/initlog ]; then exec /sbin/initlog $INITLOG_ARGS -r /etc/rc.d/rc.sysinit fi(well at last df -h said it was 4 TB)
Right after those lines i inserted the following into the file
created the file /etc/rc.d/custumCode:# Kør custum script if [ -f /etc/rc.d/custum ]; then . /etc/rc.d/custum fi
this file lookes somthing like this:
make sure to make the file executeableCode:#!/bin/bash #Custum boot cd redhat script #Export global variables export PATH=/bin:/sbin #Format ramdrive mke2fs -vvv /dev/ram1 #mount ram drive mount -n -t ext2 /dev/ram1 /ramdev #creates the file /etc/mtab and link it to mkdir /ramdev/etc touch /ramdev/etc/mtab #creates div directoryes. mkdir /ramdev/var mkdir /ramdev/var/run mkdir /ramdev/var/lock mkdir /ramdev/var/lock/subsys mkdir /ramdev/var/utmp #Create tep mkdir /ramdev/tmp #Create empty log files mkdir /ramdev/var/log mkdir /ramdev/var/log/vbox touch /ramdev/var/log/boot.log touch /ramdev/var/log/cron touch /ramdev/var/log/dmesg touch /ramdev/var/log/ksyms.0 touch /ramdev/var/log/lastlog touch /ramdev/var/log/maillog touch /ramdev/var/log/messages touch /ramdev/var/log/rpmpkgs touch /ramdev/secure touch /ramdev/spooler touch /ramdev/wtmp
I altered the file /etc/fstab
The first line should be where / gets mountet. i altered this line so it looks like this:
Then delete the file /etc/mtab and create a synlink to /proc mountsCode:/dev/root.old / ext3 defaults 0 0
and then delete /var/log and var/runCode:ln -s /proc/mounts /etc/mtab
At this point i exited chroot and created my own kernel-2.4.23
I maid sure that ext3, iso9660 was compiled in the kernel (not as modules)
Also ramdrive support, and set it to dafult size of 8Mb. And maked sure that initial ramdisk (initrd) also was compiled into the kernel.
Else i i maid as mutch as possebil as modules
I then graped the cloop source code from
http://developer.linuxtag.net/knoppi..._2.00-1.tar.gz
And compiled it for my kernel
I then created the initrd filesystem
Format it with ext2 file systemCode:dd if=/dev/zero of=./initrd bs=M count=3000
Mount itCode:mke2fs ./miniroot
I then created the following on the initrd image:Code:mount -o loop /miniroot /mnt/floppy
I then graped busybox source code from:Code:mkdir system ramdrv modules static loop mnt mnt/floppt mnt/cdrom ln -s system/bin/ ln -s system/etc/ ln -s system/lib/ ln -s system/sbin/ ln -s system/usr/ ln -s ramdev/tmp ln -s ../ramdrev/var/run ln -s ../ramdrev/var/lock ln -s ../ramdrev/var/log ln -s ../ramdrev/var/tmp ln -s ../ramdrev/var/utmp cp -dpR /dev/* ./dev/ cp ~/cloop-2.00/cloop.o ./modules/
://busybox.net/downloads/busybox-1.00-pre3.tar.bz2
Make sure you chooce build BusyBox as a static binary
under build options.
Then all you need to compile in is (i think) mount, ash, insmod
If you build it in the default directory _install
copy the contencs of this directory to the bin directory on the initrd image
Then create the file linuxrc in the root of the initrd image.
This file looks like this:
allso make sure to make this script executeableCode:#!/bin/ash ## DD 5-12-2003 #Start af initrd #Export parth export PATH=/bin:/sbin: #mounter proc mount -t proc proc /proc #mount cd note change this to where your cd drive is!!!! mount -t iso9660 /dev/hdb /loop #indlæser cloop.o modulet i kernen og peger på filen /loop/cd insmod /modules/cloop.o file=/loop/cdfs #mounter compressed fs mount -t iso9660 -o ro /dev/cloop /system #Switch troot device echo "0x100" > /proc/sys/kernel/real-root-dev exit 0
Then unmount the initrd image and crompress it with gzip
Then i created a 2.88 floppy image to be sure everything could fit on the image.
format it with msdos fsCode:dd if=/dev/zero of=/boot.img bs=M count=2880
Then grap syslinux fromCode:mkfs.msdos /boot.img
http://freshmeat.net/redir/syslinux/...x-2.07.tar.bz2
and runMake sure the switsh -s is there, otherwise the final cd might not be combatibel with your bios and won't boot!Code:syslinux -s ./boot.img
mount the floppy
and copy the nessary files on the floppy imageCode:msdos -o loop /boot.img /mnt/floppy
Create the file syslinux.cfg on the root of the floppyCode:cp /usr/src/linux-2.4.23/arch/i386/boot/bzImage /miniroot.gz /root/syslinux-2.07/ldlinux.sys /mnt/floppy
And this file contains
Unmount the floppy image.Code:DEFAULT bzImage APPEND ramdisk_size=100000 initrd=miniroot.gz LABEL linux KERNEL bzImage APPEND ramdisk_size=100000 initrd=miniroot.gz PROMPT 1
I maid the following directoryes to contain my actual cd image
/bootcd and /bootcd /boot
Copyed boot.img to /bootcd/boot
now create the compressed file system with
and to the final cd who can be burnedCode:mkisofs -pad -no-bak -J -R | /root/cloop-2.00/create_compressed_fs - 65536 > /bootcd/cdfs
Have funCode:cd /bootcd mkisofs -pad -J -R -b /boot/boot.img -c /boot/boot.cat -o /redhat_boot_cd.iso ./
Sincerley
Gozar
Though I haven't used it you could look at http://www.linuxminicd.org/mklivecd/ if the server is running Mandrake 9.2+
Does the current MandrakeMove offer any of the functionality you seek in a boot CD?
-SUO

TP-Link 5-Port Gigabit Unmanaged Ethernet Switch Network Expansion TL-SG105
$19.95
5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play
$31.99
YuanLey 8-Port 10G Ethernet Switch, 6 x 10Gbps RJ45 Ports, 2X 10Gbe SFP+ Ports
$149.99
Cisco Catalyst 2960-48TT-L 48-Port Fast Ethernet Managed Rackmount Switch
$46.99
TP-LINK TL-SG108 8-Port Gigabit Unmanaged Desktop Switch RJ-45 New in Box
$23.99
Netgear PROSAFE 8-Port 10 Gigabit/Multi-Gigabit Ethernet Switch XS508M
$229.99
Linksys 8-Port Managed Gigabit PoE+ Switch 110W w/ 2 Uplink Gigabit - LGS310MPC
$49.05
Arista DCS-7010T-48-R 48P 1GbE 4P 10GbE SFP+ RA Switch with rack mounts
$69.00
10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W
$39.99
NETGEAR 5-Port Gigabit Ethernet Unmanaged Switch (Gs305) - Desktop Quiet Fanless
$22.00