Hi! It's funny, but I was unable to find an answer to my question. I am building an embedded system (x86). I want to install syslinux on a fresh system. So, I am booting from a USB LINUX CD (Ubuntu 12.04 in this case). 1) I must have an ext2 partition (This is my application). 2) I understand that I must have a FAT partition (to install syslinux). Correct ? So, basically I understand that I must create 2 partitions. My disk is 4 GB of data, So I am thinking that the following partitioning is best : 1) 10 MB for syslinux + syslinux.config + bzImage 2) 3.99 GB for ext2 Now, remember that I am working on a fresh system (not even formatted maybe). Is there a recipe for what I should do ? Same question goes for EXTLINUX (if that is the offer). What do do when booting from a cd on a fresh system ? Thanks Mau
Mattias Schlenker
2014-Jan-13 08:09 UTC
[syslinux] installing syslinux on a fresh system (SATA)
Am 12.01.2014 21:29, schrieb Mau Z:> Hi! > > It's funny, but I was unable to find an answer to my question. > > I am building an embedded system (x86). > I want to install syslinux on a fresh system. > > So, I am booting from a USB LINUX CD (Ubuntu 12.04 in this case). > 1) I must have an ext2 partition (This is my application). > 2) I understand that I must have a FAT partition (to install > syslinux). Correct ? > > So, basically I understand that I must create 2 partitions. > My disk is 4 GB of data, So I am thinking that the following > partitioning is best : > 1) 10 MB for syslinux + syslinux.config + bzImage > 2) 3.99 GB for ext2 > > Now, remember that I am working on a fresh system (not even formatted maybe). > Is there a recipe for what I should do ? >OK, quick guide for using syslinux/extlinux as bootloader for a fresh installed Debian or Ubuntu system: 1. Partition the hard disk, on drives with 2TB or smaller you might want to go with a PC/DOS/MBR partition table. On larger drives a GUID partition table. The latter requires some MBR compatibility boot partition which is not covered here. The boot partition should be large enough to hold two kernels plus to initramfs plus configuration files. For Debian/Ubuntu usually 64MB or larger is a good size depending on the expected size of the initramfs. 2. Make the boot partition of type Linux, mark it as bootable or active! 3. Format the boot partition ext2 or ext3/4 (ext2 suffices), you do not need journaling on a boot partition that will just be written onto when a kernel gets updated 4. Copy the BIOS MBR to the hard disks MBR: dd if=/path/to/mbr.bin of=/dev/sdx 5. Now install Debian or Ubuntu using debootstrap, select either to not install GRUB or install GRUB to the partition MBR (sdx2) - this way you'll get a usable GRUB configuration as a template 6. Mount the boot partition and make it bootable with extlinux: mount /dev/sdx1 /tmp/boot mkdir -p /tmp/boot/extlinux ./path/to/extlinux --install /tmp/boot/extlinux 7. Copy the needed com32 files (I usually take "menu.c32", "vesamenu.c32", "isolinux.bin", "ifcpu.c32", "ifcpu64.c32", "reboot.c32", "chain.c32", "ldlinux.c32", "libutil.c32", "libmenu.c32", "libcom32.c32", "liblua.c32", "libgpl.c32") to /tmp/boot/extlinux 8. Copy kernel and initramfs to /tmp/boot/ 9. Write a config /tmp/boot/extlinux/extlinux.conf Reboot and be happy. I usually use this method to install servers from a minimal rescue system that just good enough to run debootstrap. I prefer using extlinux in this case because sometimes BIOS disks are swapped after PXE booting the rescue system which would force me anyway to write a boot sector on the other hard disk. And I prefer extlinux since it's serial console seems to be more robust and easier to configure than GRUB's. BTW: syslinux is for FAT boot partitions. Use extlinux on ext2/3/4 anywhere where those filesystems are natively supported! Regards, Mattias -- Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer +49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!
Ferenc Wagner
2014-Jan-13 08:44 UTC
[syslinux] installing syslinux on a fresh system (SATA)
Mau Z <zmau1962 at gmail.com> writes:> So, basically I understand that I must create 2 partitions.If your application partition is ext2, then there's no need to create a separate boot partition, you can simply use extlinux. Basically, extlinux is the (mounted) ext[234]/btrfs/XFS installer, while syslinux is the (not mounted) FAT installer of the same boot loader. -- Regards, Feri.
On Sun, Jan 12, 2014 at 3:29 PM, Mau Z <zmau1962 at gmail.com> wrote:> I am building an embedded system (x86). > I want to install syslinux on a fresh system. > > So, I am booting from a USB LINUX CD (Ubuntu 12.04 in this case). > 1) I must have an ext2 partition (This is my application). > 2) I understand that I must have a FAT partition (to install > syslinux). Correct ?1a) I presume your install target is not a USB disk? If it is a USB disk, be aware some systems don't like multiple partitions and/or custom geometry. 1b) ext2? Not necessarily. There's also ext3, ext4, and btrfs. 2) No. SYSLINUX covers FAT12/16/32, NTFS, ext2/3/4, btrfs and XFS.> So, basically I understand that I must create 2 partitions. > My disk is 4 GB of data, So I am thinking that the following > partitioning is best : > 1) 10 MB for syslinux + syslinux.config + bzImage > 2) 3.99 GB for ext21) Don't forget your initrd files. Presuming you're targeting a standard-style install, 4GB is probably tight or too small. Please consult Ubuntu docs for details. -- -Gene
Thanks but I am still in the same spot : 1) I have created a partition (ext2 with GParted). 2) Now what ? I was thinking that I should install syslinux (the bootloader). All the examples say something like "syslinux --directory /boot/syslinux/ --install /dev/sdb1" but this does not make any seance, because the is no /boot on the system. I have tried it anyways, but the answer was : "Invalid media signature (not a FAT filesystem?)" Thank again Mau On Mon, Jan 13, 2014 at 10:44 AM, Ferenc Wagner <wferi at niif.hu> wrote:> Mau Z <zmau1962 at gmail.com> writes: > > > So, basically I understand that I must create 2 partitions. > > If your application partition is ext2, then there's no need to create a > separate boot partition, you can simply use extlinux. Basically, > extlinux is the (mounted) ext[234]/btrfs/XFS installer, while syslinux > is the (not mounted) FAT installer of the same boot loader. > -- > Regards, > Feri. >