I am in the process of making a multi-use, multi-OS, bootable USB stick.
I intend that the final product will be able to boot Fatdog64-812 and several of the Puppies (e.g. friendly-fossa64, AtomicPupXXII, dpup-stretch-7.5,
s57-2018, and even some older pups).
As this USB stick may be used on any arbitrary computer it is important that the boot loader does not find other instances of any of these systems or load any savefiles or folders from the hard drive(s). The method I have used so far follows the item in the Fatdog Help i.e. “How to install Fatdog64 to a flash drive that works for both BIOS and UEFI machines” see below.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bootable USB Installation
Foreword
This is an alternative installation to install Fatdog64 to a USB flash drive. It will work for both BIOS and (U)EFI machines.
The installation process will destroy the existing content of the flash drive, so either do this on a new USB flash drive or use one that you don't mind erasing.
The installation process requires the use of “dd” command (equivalent on Windows is Win32DiskImager or similar). If you are not familiar with “dd” command, then stop now because the wrong usage of “dd” can cause data loss of your system. (There is a reason why “dd” is sometimes called as “disk destroyer”).
This installation will work from Fatdog64 811 onwards. It requires some files which is only distributed in Fatdog64 ISO from version 811 onwards. It would also work on older Fatdogs if you get the necessary files from newer Fatdogs.
-----------------------
Installation
The installation files required for this method can be found in the “usb-boot” folder on the Fatdog ISO.
There are two files: README, and boot-images.tar.xz. It is the latter which is important.
boot-image.tar.xz contains two files, called
• usb-boot-mbr.img (for USB flash drive less than 2TB in size, using MBR partition), and
• usb-boot-gpt.img (for any size, not limited to 2TB, uses GPT partition).
Each one of them expands to about 530MB when extracted. They work identically so this guide will explain how to use the MBR variant. To use the GPT variant, read the supplied README.
First, extract the usb-boot-mbr.img.
Then, use “dd” or Win32DiskImager or similar tools, and write it to your USB flash drive. In Linux this can be done as
dd if=usb-boot-mbr.img of=/dev/sdd bs=4k
Assuming that your USB flash drive is at /dev/sdd.
Note: Choosing the wrong target can destroy your harddisk and causes data loss, if you are not sure where the USB flash drive is located, then STOP NOW AND DO NOT CONTINUE WITH THIS PROCESS.
Note that you need to write to the USB disk itself, not its partition, i.e. you need to write to /dev/sdd and not to
/dev/sdd1, for example.
Once the “dd” is done, you will end up with two partitions on the USB flash drive. Ignore the first partition (16 MB FAT partition labelled “ESP”), and only look at the second partition (labelled “OS”).
The second partition will have the size of 512MB and is formatted as ext4. There are already files stored in this partition, but they are examples only to get your started.
To boot Fatdog, you just need to copy the following files from Fatdog ISO:
• vmlinuz
• initrd
• initrd-nano (optional, only if you have slow BIOS, usually if you run ancient motherboard)
And that's it.
--------------------------------------
FAQ
Q: But 512MB is too small! A: Sure. Grab the files, resize the partition using gparted or your other favourite partition tool and copy the files back.
Q: I don't like ext4. A: Sure. Grab the files, re-format the partition with the filesystem that you like, and copy the files back.
Q: There are only two partitions? A: Yes. Feel free to create the 3rd, 4th and other partitions as you wish.
Q: Can I edit the example files? For example, can I edit grub.cfg to add other entries? A: Definitely. Keep a copy in case you mess up, though.
Q: Can I boot other Puppies with this too? Multiple puppies? A: Sure, if you know the command line parameters that you need to pass, and if you know how to edit grub.cfg to do that.
Q: There are multiple configuration files! I see menu.lst on the “ESP” partition. Which one I should edit? A: You only need to edit grub.cfg on the “OS” partition. Do not touch anything else. The primary boot loader is grub2.
Q: Can I put OS files in other partition other than “OS”? E.g. Can I create a 3rd partition and put multiple versions of Fatdogs there? A: Yes you can, but it's better that you re-size “OS” to make it fit to contain all the OS you want to put. Leave the 3rd partition for your data.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
My usb stick has four partitions. Gparted shows that the first partition labelled ESP is a 16.00 MiB fat16 partition with the boot flag set. The second with the OS label is a 12.00 GiB ext4 partition. The third with the label STORAGE is also of 12.00 GiB but formatted as ext3 as it will also contain some older Pups. The final partition with the SNEAKER label takes up the remaining 4.89 GiB it is formatted as fat32. The file grub.cfg found in the OS partition was originally as shown below.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
insmod png
background_image /fatdog.png
set timeout=10
menuentry "Start Fatdog64" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs
initrd /initrd
echo Booting ...
}
menuentry "Fatdog64 with savefile in USB device" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs waitdev=5
initrd /initrd
echo Booting ...
}
menuentry "Fatdog64 with multisession support" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs savefile=direct:multi:sr0
initrd /initrd
echo Booting ...
}
menuentry "Fatdog64 with LVM and mdadm support" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs withlvm withmdadm
initrd /initrd
echo Booting ...
}
menuentry "Fatdog64 without savefile" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs savefile=none
initrd /initrd
echo Booting ...
}
menuentry "Fatdog64 without graphical desktop" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs pfix=nox
initrd /initrd
echo Booting ...
}
menuentry "---" { true; }
menuentry "Use larger font" {
loadfont /terminus24.pf2
terminal_output console
terminal_output gfxterm
}
menuentry "---" { true; }
menuentry "For problematic Radeon cards - disable radeon driver" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs blacklist=radeon
initrd /initrd
echo Booting ...
}
menuentry "For problematic Nvidia cards - disable nouveau driver" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs blacklist=nouveau
initrd /initrd
echo Booting ...
}
submenu "More options for machines with severe video problems" {
menuentry "Set video resolution to 640x480" {
terminal_output console
set gfxmode=640x480
set gfxpayload=keep
terminal_output gfxterm
}
menuentry "Set video resolution to 800x600" {
terminal_output console
set gfxmode=800x600
set gfxpayload=keep
terminal_output gfxterm
}
menuentry "Set video resolution to 1024x768" {
terminal_output console
set gfxmode=1024x768
set gfxpayload=keep
terminal_output gfxterm
}
menuentry "List all supported video resolution" {
videoinfo
echo "Press Enter to continue ..."
read
}
menuentry "Use video resolution not listed in this menu" {
echo "Enter video resolution (WxH e.g. 800x600), press Enter to abort."
read gfxmode
terminal_output console
set gfxpayload=keep
terminal_output gfxterm
}
menuentry "Start Fatdog64 with the chosen resolution" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs nomodeset pfix=xorgwizard savefile=none
initrd /initrd
echo Booting ...
}
}
menuentry "---" { true; }
menuentry "Firmware configuration" {
fwsetup
}
menuentry "Shutdown" {
halt
}
menuentry "Reboot" {
reboot
}
menuentry "Fatdog64 for slow BIOS and bootloaders" {
echo Loading ...
linux /vmlinuz rootfstype=ramfs mergeinitrd1=local:/initrd waitdev=3
initrd /initrd-nano
echo Booting ...
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The above file needs to be modified to enable the booting of any of the puppies installed and also to allow the Fatdog64 files to be moved to a directory in this partition.
The OS partition now contains the directories, AtomicPupXXII, dpup-stretch-7.5, Fatdog64-812, friendly-fossa64 and lost+found as well as the files fatdog.png, grub.cfg terminus24.pf2 and UUID. The file UUID contains a copy of the uuid of the partition for reference. The STORAGE partition contains the directories, lost+found, PLOP, s57-2018, someone_else and someone_local and a file UUID. The last partition SNEAKER is currently unused containing only the System Volume Information directory.
The modified grub.cfg file is now as shown in the file below.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
insmod png
background_image /fatdog.png
set timeout=10
menuentry "someone_local Fatdog64 with savefile in USB device" {
search --no-floppy --set=root --fs-uuid 0284e81b-569f-40a6-89c6-de69334c4d9d
echo Loading ...
linux /Fatdog64-812/vmlinuz rootfstype=ramfs waitdev=5
savefile=ram:uuid:0284e81b-569f-40a6-89c6-de69334c4d9d:Fatdog64-812/fd64save-someone_local
initrd /Fatdog64-812/initrd
echo Booting ...
}
menuentry "test Fatdog64 with savefile in USB device" {
search --no-floppy --set=root --fs-uuid 0284e81b-569f-40a6-89c6-de69334c4d9d
echo Loading ...
linux /Fatdog64-812/vmlinuz rootfstype=ramfs waitdev=5
savefile=direct:device:sdd2:Fatdog64-812/fd64save-test
initrd /Fatdog64-812/initrd
echo Booting ...
}
menuentry "friendly-fossa64" {
search --no-floppy --set=root --fs-uuid 0284e81b-569f-40a6-89c6-de69334c4d9d
echo Loading ...
linux /friendly-fossa64/vmlinuz psubdir=/friendly-fossa64
pmedia=usbflash pfix=fsck pupsfs=/friendly-fossa64/puppy_fossapup64_9.5.sfs
initrd /friendly-fossa64/initrd.gz
echo Loading
}
menuentry "AtomicPupXXII" {
search --no-floppy --set=root --fs-uuid 0284e81b-569f-40a6-89c6-de69334c4d9d
echo Loading ...
linux /AtomicPupXXII/vmlinuz psubdir=/AtomicPupXXII
pmedia=usbflash pfix=fsck pupsfs=/AtomicPupXXII/puppy_slacko_7.0.sfs
initrd /AtomicPupXXII/initrd.gz
echo Loading
}
menuentry "dpup-stretch-7.5" {
search --no-floppy --set=root --fs-uuid 0284e81b-569f-40a6-89c6-de69334c4d9d
echo Loading ...
linux /dpup-stretch-7.5/vmlinuz psubdir=/dpup-stretch-7.5
pmedia=usbflash pfix=fsck pupsfs=/dpup-stretch-7.5/puppy_stretch_7.5.sfs
initrd /dpup-stretch-7.5/initrd.gz
echo Loading
}
menuentry "s57-2018" {
search --no-floppy --set=root --fs-uuid 12bb610b-85c2-412b-992c-a9009f9baacd
echo Loading ...
linux /s57-2018/vmlinuz psubdir=/s57-2018
pmedia=usbflash pfix=fsck pupsfs=/s57-2018/puppy_slacko_5.7.sfs
initrd /s57-2018/initrd.gz
echo Loading
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
With this modified grub.cfg in the root of the OS partition it is possible to boot into any of the four puppies but although you can boot into Fatdog64-812, make some changes and save them the save folder is not found on subsequent boots. The second of the two Fatdog menu entries contains the line
savefile=direct:device:sdd2:/Fatdog64-812/fd64save-test
suggested in an error message. This did not help and would not have been a satisfactory fix in any case as as the usb stick would probably have been
seen as sdx on a different computer.
So now to my question. What should the menuentry be for Fatdog? (and for the other puppies are the other menu entries correct or are they working despite the changes that have been made?)
TIA
Ken
PS My apologies for embedding three long text files in my post but I got into a tangle trying to attach them.
I now believe the savefile bit should have been
savefile=ram:uuid:0284e81b-569f-40a6-89c6-de69334c4d9d:/Fatdog64-812/
i.e. the name of the save folder should not have been at the end.
I have now created a new usb stick using the limine bootloader from easyOS
edited 220802.