To make a Boot USB in Mint (not EFI)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
kukamuumuka

To make a Boot USB in Mint (not EFI)

Post by kukamuumuka »

To make a boot-usb using Syslinux and Grub4Dos.

Life is dangerous, so leave this tutorial if you are not sure what you are doing! :wink:


In Mint 17

1. Format the USB as fat32 filesystem
2. Mount the USB and open Terminal into USB (or via Termial .. cd /path/usb)
3. copy menu.c32 to the USB

Code: Select all

cp /usr/lib/syslinux/menu.c32 .
Notice the comma also in the command!

4. Install extlinux and make ldlinux.sys file

Code: Select all

apt install extlinux

Code: Select all

sudo extlinux --install .
5. Make a syslinux.cfg file, like

Code: Select all

default menu.c32
prompt 0
menu title Multiboot USB
timeout 100

label Multiboot USB
menu label Multiboot USB
kernel /grub.exe
6. Install Syslinux

Code: Select all

sudo blkid ### tells drives and partitions

Code: Select all

sudo dd bs=440 count=1 if=/usr/lib/syslinux/mbr.bin of=/dev/sdX ## where X=drive
7. Download, extract and copy grub4dos files grub.exe and menu.lst to the USB.

An example about menu.lst file

Code: Select all

# menu.lst produced by grub4dosconfig-v1.8.0
color white/green yellow/blue white/black green/black
#splashimage=/splash.xpm
timeout 30
default 0

color white/blue blue/yellow white/black yellow/black
#color white/blue black/cyan white/black cyan/black
timeout 30
default 0
fallback 1

title find and load Grub2 (not EFI)
find --set-root /boot/grub/i386-pc/core.img
kernel /boot/grub/i386-pc/core.img
boot

title find and load Grub2 older version (not EFI)
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2

title find and load BOOTMGR of Windows 
fallback 2
find --set-root --ignore-floppies /bootmgr
chainloader /bootmgr
savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
fallback 4
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2

title Windows NT/2000/XP hd1 p1
rootnoverify (hd0,0)
chainloader /ntldr
  
title Windows NT/2000/XP hd1 p2
rootnoverify (hd0,1)
chainloader /ntldr

title Windows NT/2000/XP hd1 p3
rootnoverify (hd0,2)
chainloader /ntldr

title Windows NT/2000/XP hd1 p4
rootnoverify (hd0,3)
chainloader /ntldr

title Windows NT/2000/XP hd2 p1
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,0)
chainloader /ntldr
  
title Windows NT/2000/XP hd2 p2
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,1)
chainloader /ntldr

title Windows NT/2000/XP hd2 p3
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,2)
chainloader /ntldr

title Windows NT/2000/XP hd2 p4
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,3)
chainloader /ntldr

  title Windows Vista/2008/7 hd1 p1
  rootnoverify (hd0,0)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p2
  rootnoverify (hd0,1)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p3
  rootnoverify (hd0,2)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p4
  rootnoverify (hd0,3)
  chainloader /bootmgr

  title Windows Vista/2008/7 hd2 p1
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,0)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd2 p2
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,1)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p3
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,2)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p4
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,3)
  chainloader /bootmgr
  
title Windows 9x/Me hd1 p1
rootnoverify (hd0,0)
chainloader /io.sys

title Windows 9x/Me hd1 p2
rootnoverify (hd0,1)
chainloader /io.sys

title Windows 9x/Me hd1 p3
rootnoverify (hd0,2)
chainloader /io.sys

title Windows 9x/Me hd1 p4
rootnoverify (hd0,3)
chainloader /io.sys



title Windows 9x/Me hd2 p1
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,0)
chainloader /io.sys

title Windows 9x/Me hd2 p2
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,1)
chainloader /io.sys

title Windows 9x/Me hd2 p3
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,2)
chainloader /io.sys

title Windows 9x/Me hd2 p4
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,3)
chainloader /io.sys

title Find Grub menu on HDD 1
  errorcheck off
  find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
  find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
  find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
  errorcheck on
  commandline
title Find Grub menu on HDD 2
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  errorcheck off
  find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
  find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
  find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
  errorcheck on
  commandline
  
title Find Grub2\nBoot up grub2 if installed
find --set-root --ignore-floppies --ignore-cd /boot/grub/i386-pc/core.img
kernel /boot/grub/core.img

title Restart System
reboot

title Shutdown System
halt
boot_usb_files.png


###########################################################################################
###########################################################################################

In Mint 18 and LMDE2


1. Format the USB as fat32 filesystem
2. Mount the USB and open Terminal into USB (or via Termial .. cd /path/usb)
3. copy menu.c32 to the USB

Code: Select all

cp /usr/lib/syslinux/modules/bios/* .
Notice the comma also in the command!

4. Install extlinux and make ldlinux.sys file

Code: Select all

apt install extlinux

Code: Select all

sudo extlinux --install .
5. Make a syslinux.cfg file, like

Code: Select all

default menu.c32
prompt 0
menu title Multiboot USB
timeout 100

label Multiboot USB
menu label Multiboot USB
kernel /grub.exe
6. Install Syslinux

Code: Select all

sudo blkid ### tells drives and partitions

Code: Select all

sudo dd bs=440 count=1 if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdX ## where X=drive
7. Download, extract and copy grub4dos files grub.exe and menu.lst to the USB.

An example about menu.lst file

Code: Select all

# menu.lst produced by grub4dosconfig-v1.8.0
color white/green yellow/blue white/black green/black
#splashimage=/splash.xpm
timeout 30
default 0

color white/blue blue/yellow white/black yellow/black
#color white/blue black/cyan white/black cyan/black
timeout 30
default 0
fallback 1

title find and load Grub2 (not EFI)
find --set-root /boot/grub/i386-pc/core.img
kernel /boot/grub/i386-pc/core.img
boot

title find and load Grub2 older version (not EFI)
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2

title find and load BOOTMGR of Windows 
fallback 2
find --set-root --ignore-floppies /bootmgr
chainloader /bootmgr
savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
fallback 4
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2

title Windows NT/2000/XP hd1 p1
rootnoverify (hd0,0)
chainloader /ntldr
  
title Windows NT/2000/XP hd1 p2
rootnoverify (hd0,1)
chainloader /ntldr

title Windows NT/2000/XP hd1 p3
rootnoverify (hd0,2)
chainloader /ntldr

title Windows NT/2000/XP hd1 p4
rootnoverify (hd0,3)
chainloader /ntldr

title Windows NT/2000/XP hd2 p1
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,0)
chainloader /ntldr
  
title Windows NT/2000/XP hd2 p2
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,1)
chainloader /ntldr

title Windows NT/2000/XP hd2 p3
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,2)
chainloader /ntldr

title Windows NT/2000/XP hd2 p4
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,3)
chainloader /ntldr

  title Windows Vista/2008/7 hd1 p1
  rootnoverify (hd0,0)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p2
  rootnoverify (hd0,1)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p3
  rootnoverify (hd0,2)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p4
  rootnoverify (hd0,3)
  chainloader /bootmgr

  title Windows Vista/2008/7 hd2 p1
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,0)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd2 p2
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,1)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p3
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,2)
  chainloader /bootmgr
  
  title Windows Vista/2008/7 hd1 p4
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  rootnoverify (hd0,3)
  chainloader /bootmgr
  
title Windows 9x/Me hd1 p1
rootnoverify (hd0,0)
chainloader /io.sys

title Windows 9x/Me hd1 p2
rootnoverify (hd0,1)
chainloader /io.sys

title Windows 9x/Me hd1 p3
rootnoverify (hd0,2)
chainloader /io.sys

title Windows 9x/Me hd1 p4
rootnoverify (hd0,3)
chainloader /io.sys



title Windows 9x/Me hd2 p1
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,0)
chainloader /io.sys

title Windows 9x/Me hd2 p2
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,1)
chainloader /io.sys

title Windows 9x/Me hd2 p3
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,2)
chainloader /io.sys

title Windows 9x/Me hd2 p4
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
rootnoverify (hd0,3)
chainloader /io.sys

title Find Grub menu on HDD 1
  errorcheck off
  find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
  find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
  find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
  errorcheck on
  commandline
title Find Grub menu on HDD 2
  map (hd1) (hd0)
  map (hd0) (hd1)
  map --hook
  errorcheck off
  find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
  find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
  find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
  errorcheck on
  commandline
  
title Find Grub2\nBoot up grub2 if installed
find --set-root --ignore-floppies --ignore-cd /boot/grub/i386-pc/core.img
kernel /boot/grub/core.img

title Restart System
reboot

title Shutdown System
halt
process.jpg
process2.jpg
Last edited by kukamuumuka on Sun Oct 22, 2017 12:35 pm, edited 6 times in total.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: To make a Boot USB (not EFI)

Post by catweazel »

That tutorial is going to cause newcomers some trouble. For starters, cd /path/usb makes absolutely no sense unless you explain what "path" and "usb" are supposed to represent and what they need to be replaced with, and how to determine the correct values. Second, cp /usr/lib/syslinux/menu.c32 is completely out of left field.

From Mint Cinnamon 18.2:

Code: Select all

catweazel@vbox-cinnamon ~ $ ls /usr/lib/syslinux/
mbr  memdisk  modules
From Mint MATE 18.2:

Code: Select all

catweazel@vbox-mate ~ $ ls /usr/lib/syslinux/
mbr  memdisk  modules
From Mint KDE 18.2:

Code: Select all

catweazel@Fenella ~ $ ls /usr/lib/syslinux/
mbr  memdisk  modules
It simply does not exist in a standard installation, yet you make no mention of where it came from or what it or why it's needed.

Then there's this:

Code: Select all

/usr/lib/syslinux/mbr.bin
In 18.2 it's /usr/lib/syslinux/mbr/.bin

And this:

Code: Select all

sudo extlinux --install .
Good grief. --install -i Install over the current bootsector

What happens when the newcomer isn't in the imaginary cd /path/usb directory? B0rked!

There are other issues but you get the point. This tutorial should be deleted, IMO.

-100
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
kukamuumuka

Re: To make a Boot USB (not EFI)

Post by kukamuumuka »

catweazel wrote: This tutorial should be deleted, IMO.
Aha.
Post Reply

Return to “Tutorials”