English / Deutsch | Print version Plop Linux  

<< Previous
Create a LiveCD

Table of Contents

Next >>
Boot from ISO

Bootable USB drive


Automatic with a third party tool
Step by step with Linux
Step by step with Windows

Automatic with a third party tool


Linux: MultiBoot LiveUSB

Windows: Universal USB Installer, Linux Live USB Creator


Step by step with Linux


Requirements to make an USB drive bootable:

  • File system on the device must be FAT. When you use EXT2/3/4 then you have to use extlinux instead of syslinux.
  • The Plop Linux file ploplinux-24.2-x86_64.tar.gz
  • The program syslinux

You have to do the following steps from a command line. Login as root (or do a sudo bash) to be sure to have all rights.

  1. Plug in your USB drive.

  2. Run dmesg to determine which device node is used for your USB drive. Linux need's a few seconds to detect the USB drive.

    Example output:
    usb 1-3: new high speed USB drive using ehci_hcd and address 3
    usb 1-3: configuration #1 chosen from 1 choice
    scsi0 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 3
    usb-storage: waiting for device to settle before scanning
    scsi 0:0:0:0: Direct-Access     LEXAR    GEYSER JUMPDRIVE 1.00 PQ: 0 ANSI: 1 CCS
    SCSI device sba: 1001952 512-byte hdwr sectors (513 MB)
    sba: Write Protect is off
    sdb: Mode Sense: 23 00 00 00
    sdb: assuming drive cache: write through
    SCSI device sdb: 1001952 512-byte hdwr sectors (513 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 23 00 00 00
    sdb: assuming drive cache: write through
     sdb: sdb1
     sd 0:0:0:0: Attached scsi removable disk sdb
     usb-storage: device scan complete
    

    In this case, Linux use sdb as device name. The device can be used as /dev/sdb. This device has 1 partition called sdb1 (file name of the device node is /dev/sdb1). We use this partitions to boot with Plop Linux.

  3. Mount the device to determine the file system. We use the directory /mnt/usb as mount point. If this directory not exists then create it.

    mkdir /mnt/usb

    Now mount the partition from the USB drive.

    mount /dev/sdb1 /mnt/usb -t vfat


    If mount fails with

    mount: /dev/sdb1 is not a valid block device
    

    You are using the wrong device node.

    If mount fails with

    mount: wrong fs type, bad option, bad superblock on /dev/sdb1
    

    The partition /dev/sdb1 (in my case) is not formatted with fat.


    If mount reports nothing, then proceed with the next step.

  4. You have to download the file ploplinux-24.2-x86_64.tar.gz to your home directory.

    Then extract the downloaded file.

    tar xfvz ploplinux-24.2-x86_64.tar.gz

  5. Copy the extracted Plop Linux files on you USB drive.

    cp -avr ploplinux-24.2-x86_64/* /mnt/usb/

  6. Now, the root directory of your USB drive should have the directories efi, ploplinux, syslinux.

    Check this with: ls /mnt/usb

  7. Unmount the USB drive.

    umount /mnt/usb

  8. Make the partition bootable with syslinux.

    syslinux /dev/sdb1

  9. Use fdisk to activate the boot flag for the boot partition.

    • fdisk /dev/sdb

    • Use the command p and enter to take a look at the partition table.

      Example output:

      Disk /dev/sdb: 512 MB, 512999424 bytes
      16 heads, 63 sectors/track, 994 cylinders
      Units = cylinders of 1008 * 512 = 516096 bytes
      
         Device Boot   Start   End   Blocks   Id  System
      /dev/sdb1            1   994   500944+   e  W95 FAT16 (LBA)
      
      Command (m for help): 
      

      Beside /dev/sdb1 there is no * below Boot. That means /dev/sdb1 is not activated for boot.

      The Id should be e W95 FAT16 (LBA) or c W95 FAT32 (LBA) for partitions greater than 2GB. If you change the Id, you have to format the partition again. (You loose all data on the partition)

    • Change the boot flag for /dev/sdb1

      Use a and enter.
      Now select a partition between 1-4. In my case it's 1 (sdb1).

    • Change the Id for /dev/sdb1 (only needed if there is a wrong Id)

      Use t Now select a partition between 1-4. In my case it's 1 (sdb1).
      Now enter e for W95 FAT16 (LBA) or c for W95 FAT32 (LBA) for partitions >2GB.

    • Use p and enter to list the partition table.

      Example output:

      Disk /dev/sdb: 512 MB, 512999424 bytes
      16 heads, 63 sectors/track, 994 cylinders
      Units = cylinders of 1008 * 512 = 516096 bytes
      
         Device Boot   Start   End   Blocks   Id  System
      /dev/sdb1   *        1   994   500944+   e  W95 FAT16 (LBA)
      
      Command (m for help): 
      

      Now we can see the * beside /dev/sdb1

      The command w writes the changes to the device and quits fdisk. If you don't want to save but quit then use q.

    • If you changed the Id, then format the partition. After formatting you have to copy all files again.

      Format: mkfs /dev/sdb1, for fat32 use mkfs -F 32 /dev/sdb1

  10. If the USB drive does not boot, maybe the program in the MBR is not ok. You can fix this with

    lilo -M /dev/sdb

After those steps, you should be able to boot from USB with Plop Linux.


Step by step with Windows


Requirements to make an USB drive bootable:


Let's start

  1. Plug in your USB drive.

  2. In my example, the drive letter of the USB drive is F:.

    Check the file system. Use the right mouse click on F: and then Properties from the context menu. You can see now, how much space is left on the device and file system type. It should be FAT12, FAT16 or FAT32.

  3. Extract the Plop Linux files from ploplinux-24.2-x86_64.zip on the USB drive.

    The directories ploplinux and syslinux must be in the root directory F:\ of your USB drive.

  4. Download syslinux.exe to your desktop.

    Open the Command Prompt (in Accessories of your Windows menu).

    Change the directory to your Desktop.

    cd Desktop

    Run syslinux with your drive letter as parameter.
    BE SURE TO USE THE CORRECT DRIVE LETTER. If you use ex. C: then your windows will not boot up next time and you have to repair it with the windows rescue console.

    syslinux f:

Your usb drive should be bootable now.


It doesn't boot

When your device won't boot, maybe the boot flag in the MBR of your device is not set or a wrong partition ID is set. There can be a wrong program in the MBR too (but that's no problem to fix).

There are 2 ways to activate the boot flag and change the partition ID:

  1. With Windows

    You need the program plppart32.exe. Save it in the same folder like syslinux. Switch to the Command Prompt. To determine which device number Windows is using for your USB drive run

    mmc %SystemRoot%\system32\compmgmt.msc

    Click at Storage and then at Disk Management. In the window right below you can see Disk 0 (your first hard disk), CD 0 (CD-Rom drive) and so on. Your USB drive is in the list too. If your device is Disk 2 then run from the Command Prompt in the folder you stored plppart32.exe to see the partition table the command

    plppart32 -d 2 -i

    Example output:

    Using physical drive 2
    
    Drive geometry:
      Media Type         : RemovableMedia
      Cylinders          : 62
      Tracks per Cylinder: 255
      Sectors per Track  : 63
      Bytes per Sector   : 512
    
    NR  ID  BOOT    SS  SH   SC  ES  EH   EC   LBAST   LBASEC  SIZE
    ----------------------------------------------------------------------
    1  0x0e          1   1    0  63  15   992     63  1001889 489.00 MByte
    2  0x00          0   0    0   0   0     0      0        0 0.00 MByte
    3  0x00          0   0    0   0   0     0      0        0 0.00 MByte
    4  0x00          0   0    0   0   0     0      0        0 0.00 MByte
    

    The device has a Media Type RemovableMedia. The boot flag of the first partition is not set. To set the boot flag for the first partition use

    plppart32 -d 2 -p 1 -b 0x80

    The partition type should be 0x0e or 0x0c for partitions greater than 2GB. If you change the partition ID, you have to format the partition again and do all steps again.

    plppart32 -d 2 -p 1 -id 0x0e

    If you take another look at the partition table, then the partition 1 should be changed below BOOT.

    NR  ID  BOOT    SS  SH  SC  ES  EH   EC   LBAST   LBASEC  SIZE
    ---------------------------------------------------------------------
    1  0x0e *[0x80]  1   1   0  63  15   992     63  1001889 489.00 MByte
    

    If you changed the ID, then you have to format the partition and do all steps again. If you format, you lose all data on the partition.

    Now you should be able to boot. If not, maybe the mbr program is not ok. You have to fix it with Linux.

  2. with Linux

    Download the Plop Linux ISO image and burn it on a cd, boot up with Linux and see the Linux version 1.1. Make USB drive bootable step-by-step point 2, 10 and 11.



<< Previous
Create a LiveCD

Table of Contents

Next >>
Boot from ISO


© 2024 by Elmar Hanlhofer