Bugs:
*** Don't use the characters "." or "-" in the kernel name!!! (Only syslinux?) ***
Must remove any old backup files e.g. isolinux.cfg~
Info:
Graphical boot:
append vga=ask
Get it:
http://www.kernel.org/pub/linux/utils/boot/syslinux/
Needs nasm to compile:
installpkg ../../Desktop/nasm-0.98.39-i486-1rsa.tgz
Syslinux needs a MBR or a bootloader e.g GAG. (GAG doesn't work with syslinux/extlinux)
Create Slackware installation USB stick/hd
NB: Some BIOS hangs if the first partition is not bootable..
http://www.slackware.com/~alien/tools/usbinstall/12.0/
Use Extlinux
Create ext2/3 partition
mke2fs /dev/sdb1
Mount it
mount /dev/sdb1 /mnt/sdb1
Create dir where extlinux should be installed:
mkdir /mnt/sdb1/boot
Create extlinux.conf
Note about paths!
3. Pathnames can be absolute or relative; if absolute (with a leading slash), they are relative to the root of the filesystem on which extlinux is installed (/boot in the example above), if relative, they are relative to the extlinux directory.
kedit /mnt/sdb1/boot/extlinux.conf
default hugesmp.s prompt 1 timeout 1200 display message.txt F1 message.txt F2 f2.txt label huge.s kernel kernels/huge.s/bzImage append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=huge.s label hugesmp.s kernel kernels/hugesmp.s/bzImage append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=hugesmp.s label speakup.s kernel kernels/speakup.s/bzImage append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=speakup.s
Copy some files from isolinux. Copy all kernels and initrd.img
cp -r /mnt/hda/kernels /mnt/sdb1/boot
cp /mnt/hda/isolinux/initrd.img /mnt/sdb1/boot
cp /mnt/hda/isolinux/f2.txt /mnt/sdb1/boot
cp /mnt/hda/isolinux/message.txt /mnt/sdb1/boot
Install it:
A bootloader will be installed in /dev/sdb1
extlinux --install /mnt/sdb1/boot
Must also install a bootloader in MBR
cat mbr/mbr.bin > /dev/sdb
or
http://www.slackware.com/~alien/slackbuilds/ms-sys/pkg/
installpkg ms-sys-2.1.2-i486-1.tgz
ms-sys --mbr95b /dev/sdb
Change the partition type to 0C (WIN95 FAT32 LBA). Use cfdisk.
Make sure that /dev/sdb1 is marked as active. Use cfdisk.
Copy packages from DVD
cp -r /mnt/hda/slackware /mnt/sdb1
After rebooting from USB, mount the USB to some dir and select 'Install from premounted dir' from the menu in setup.
Install as usual..
As above but with syslinux
mkdosfs -F32 /dev/sdb1
mkdir /mnt/sdb1/syslinux
kedit /mnt/sdb1/syslinux/syslinux.cfg
default vmlinuz initrd=initrd.gz pmedia=usbflash
syslinux /dev/sdb1
Replace Lilo/Grub with Extlinux
---
ONLY needed if root partition is not ext2/3:
Create ext2/3 partition where extlinux should be installed. This partition should preferably be mounted as /boot and contain kernels etc as usual. Can be small, around 100MB.
- mke2fs /dev/sdb1
Mount it:
mount /dev/sdb1 /boot
Add to /etc/fstab
/dev/sdb1 /boot ext3 defaults 0 0
---
Create dir where extlinux should be installed:
mkdir /boot/extlinux
Create extlinux.conf
kedit /boot/extlinux/extlinux.conf
default ZenInitrdSda1 prompt 1 timeout 1200 display message.txt F1 message.txt F2 f2.txt label ZenInitrdSda1 kernel ../vmlinuz-2.6.23.9 append initrd=../initrd.gz
Create message.txt and f2.txt
kedit /boot/extlinux/message.txt
kedit /boot/extlinux/f2.txt
Install it:
A bootloader will be installed in /dev/sdb1
extlinux --install /boot/extlinux
Must also install a bootloader in MBR
cat mbr/mbr.bin > /dev/sdb
Make sure that /dev/sdb1 is marked as active. Use cfdisk.
Not neccessary to reinstall extlinux if changing kernel or initrd!
Emulate a CD/DVD on a USB stick
Example Puppy 3.01
(This can also be done from within puppy with the "Puppy universal installer")
Use Extlinux
Create ext2/3 partition on the USB stick
mkfs -t ext2 /dev/sdb1
Mount it
mount /dev/sdb1 /mnt/sdb1
Create dir where extlinux should be installed:
mkdir /mnt/sdb1/extlinux
mount the CD/DVD
mount /dev/dvd /mnt/dvd
Copy all files to USB
cp /mnt/dvd/* /mnt/sdb1/extlinux
Rename isolinux.cfg to extlinux.conf
pmedia can be cd, usbflash, ?
default puppy display boot.msg prompt 1 timeout 50 label puppy kernel vmlinuz append initrd=initrd.gz pmedia=cd
Install it:
A bootloader will be installed in /dev/sdb1
extlinux --install /mnt/sdb1/extlinux
Must also install a bootloader in MBR
cat mbr/mbr.bin > /dev/sdb
Make sure that /dev/sdb1 is marked as active. Use cfdisk.
ZenEdu remastering
http://wiki.zenwalk.org/index.php?title=ZenEdu_Documentation
Remaster Slackware 12 Installation DVD
From Slackware 12 DVD:
Need mkisofs
Isolinux is already on the DVD..
From isolinux man page:
To create an image, create a directory called "isolinux" (or, if you
prefer, "boot/isolinux") underneath the root directory of your ISO
image master file tree. Copy isolinux.bin, a config file called
"isolinux.cfg" (see syslinux.doc for details on the configuration
file), and all necessary files (kernels, initrd, display files, etc.)
into this directory, then use the following command to create your ISO
image (add additional options as appropriate, such as -J or -R):
mkisofs -o <isoimage> \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
<root-of-iso-tree>
Copy the DVD to harddisk
cp -rp /mnt/hda/* /mnt/sda4/sw12/
Slackware 12 uses an initrd which is mounted as the root filesystem. Put any tools which should be directly available there.
bash-3.1# pwd /mnt/sda4/sw12/isolinux bash-3.1# ll initrd.img -rw-r--r-- 1 root root 5359386 2007-07-01 00:55 initrd.img
http://www.gnu.org/software/cpio/manual/cpio.html
cp initrd.img ~/newinitrd/initrd.gz
cd ~/newinitrd
Unpack it:
gunzip initrd.gz
cpio -idv < initrd
rm initrd
Make any modifications you want..
Location of setup: usr/lib/setup/setup
Recreate it:
find . | cpio -o -H newc | gzip -9c > ../initrd.img
Copy the new initrd in place:
cp ../initrd.img /mnt/sda4/sw12/isolinux
Create the iso image:
mkisofs -o /mnt/sda4/iso/sw12-20080212.iso -R -J -A "Slackware Install" -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table -sort isolinux/iso.sort -b isolinux/isolinux.bin -c isolinux/isolinux.boot -V "SlackDVD" /mnt/sda4/sw12
Burn it to DVD..
Use 200MB partition for /boot and use extlinux to boot it
Create and format the partition as ext2 and set the boot flag.
Copy the current contents in /boot to the new partition.
mount /dev/sdb3 /mnt/hd
cp -r /boot/* /mnt/hd
mkdir /mnt/hd/extlinux
Create extlinux.conf
kedit /mnt/hd/extlinux/extlinux.conf
sdb1 is the root (/) partition..
default sdb1 prompt 1 timeout 1200 label sdb1 kernel ../vmlinuz append root=/dev/sdb1
Install it:
A bootloader will be installed in /dev/sdb3
extlinux --install /mnt/hd/extlinux
Must also install a bootloader in MBR
cat mbr/mbr.bin > /dev/sdb
Booting from USB stick on computers which are picky about how the USB stick should "look".
Create a FAT (or ext3) filesystem across the whole USB stick (e.g. /dev/sdc):
A MBR (some kind of) is automatically created by the mkdosfs command.
mkdosfs -IF32 /dev/sdc (if ext3: mke2fs -j -m 0 /dev/sdc) sync * Unplug-replug * mount /dev/sdc /mnt/tmp (if ext3: use extlinux..) mkdir /mnt/tmp/syslinux cp /boot/initrd.gz /mnt/tmp/syslinux cp /boot/vmlinuz /mnt/tmp/syslinux kedit /mnt/tmp/syslinux/syslinux.cfg Put into syslinux.cfg: default vmlinuz initrd=initrd.gz umount /mnt/tmp sync syslinux /dev/sdc sync
default BOOT_SW_CURRENT
prompt 1
timeout 1200
#display message.txt
label BOOT_SW_CURRENT
#2.6.24.4-xxx
kernel vmlinuz1
append initrd=initrd.gz label=BOOT_SW_CURRENT
label USB-ROOT
#2.6.27.7
kernel vmlinuz2
append initrd=initrd.gz label=USB-ROOT
Load other OS (for example Windows XP)
Must copy chain.c32 and treat it as a "kernel"
Use only from CD/DVD or internal disk, doesn't work when booting from an USB-stick. The disks gets switched and the BIOS gets confused..
chain.c32 hd0 0 will load the Master Boot Record.
chain.c32 hd0 1 will load the Boot Record from partition 1.
# Windows CE/ME/NT, a very dense operating system.
# Second partition (2) on the first hard disk (hd0);
# Linux would *typically* call this /dev/hda2 or /dev/sda2.
LABEL hd0-2
KERNEL chain.c32
APPEND hd0 2
LABEL hd
KERNEL chain.c32
Remove unremovable files..
chattr -i extlinux.sys rm extlinux.sys
Change keyboard layout
https://subtrac.sara.nl/oss/pxeconfig/browser/trunk/syslinux-doc/keytab-lilo.doc
This is the documentation for the keytab-lilo.pl program. It was
2 taken verbatim from the LILO-20 README file; only this header was
3 added.
4
5 LILO program code, documentation and auxiliary programs are
6 Copyright 1992-1997 Werner Almesberger.
7 All rights reserved.
8
9 Redistribution and use in source and binary forms of parts of or the
10 whole original or derived work are permitted provided that the
11 original work is properly attributed to the author. The name of the
12 author may not be used to endorse or promote products derived from
13 this software without specific prior written permission. This work
14 is provided "as is" and without any express or implied warranties.
15
16 To use a LILO keyboard table with SYSLINUX, specify the KBDMAP command
17 in syslinux.cfg, for example:
18
19 kbdmap de.ktl
20
21 ============================================================================
22
23 Keyboard translation
24 --------------------
25
26 The PC keyboard emits so-called scan codes, which are basically key
27 numbers. The BIOS then translates those scan codes to the character codes
28 of the characters printed on the key-caps. By default, the BIOS normally
29 assumes that the keyboard has a US layout. Once an operating system is
30 loaded, this operating system can use a different mapping.
31
32 At boot time, LILO only has access to the basic services provided by the
33 BIOS and therefore receives the character codes for an US keyboard. It
34 provides a simple mechanism to re-map the character codes to what is
35 appropriate for the actual layout.*
36
37 * The current mechanism isn't perfect, because it sits on top of the
38 scan code to character code translation performed by the BIOS. This
39 means that key combinations that don't produce any useful character on
40 the US keyboard will be ignored by LILO. The advantage of this approach
41 is its simplicity.
42
43
44 Compiling keyboard translation tables
45 - - - - - - - - - - - - - - - - - - -
46
47 LILO obtains layout information from the keyboard translation tables Linux
48 uses for the text console. They are usually stored in
49 /usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads
50 those tables and generates a table suitable for use by the map installer.
51 keytab-lilo.pl invokes the program loadkeys to print the tables in a format
52 that is easy to parse.*
53
54 * On some systems, only root can execute loadkeys. It is then necessary
55 to run keytab-lilo.pl as root too.
56
57 keytab-lilo.pl is used as follows:
58
59 keytab-lilo.pl [ -p <old_code>=<new_code> ] ...
60 [<path>]<default_layout>[.<extension>] ]
61 [<path>]<kbd_layout>[.<extension>] ]
62
63 -p <old_code>=<new_code>
64 Specifies corrections ("patches") to the mapping obtained from the
65 translation table files. E.g. if pressing the upper case "A" should
66 yield an at sign, -p 65=64 would be used. The -p option can be
67 repeated any number of times. The codes can also be given as
68 hexadecimal or as octal numbers if they are prefixed with 0x or 0,
69 respectively.
70 <path> The directory in which the file resides. The default path is
71 /usr/lib/kbd/keytables.
72 <extension> Usually the trailing .map, which is automatically added if
73 the file name doesn't contain dots.
74 <default_layout> Is the layout which specifies the translation by the
75 BIOS. If none is specified, us is assumed.
76 <kbd_layout> Is the actual layout of the keyboard.
77
78 keytab-lilo.pl writes the resulting translation table as a binary string to
79 standard output. Such tables can be stored anywhere with any name, but the
80 suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"),
81 where <kbd> is the name of the keyboard layout.
82
83 Example:
84
85 keytab-lilo.pl de >/boot/de.ktl
keytab-lilo.pl sv-latin1 >/boot/extlinux/se.ktl
In extlinux.conf:
kbdmap se.ktl
In lilo.conf:
keytable=/boot/se.ktl
