HOWTO make Puppy boot from a USB partition with EXTLINUX

How to do things, solutions, recipes, tutorials
Message
Author
linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

HOWTO make Puppy boot from a USB partition with EXTLINUX

#1 Post by linuxcbon »

HOWTO make Puppy boot from a USB partition with EXTLINUX
--FRUGAL install--


** backup important data from the USB stick to another place **

PLUG THE USB STICK IN
Search for the stick "device" name, for example /dev/sdc (check with gparted or dmesg).

INSTALL THE MBR TO THE USB STICK
For 32 bits linux :

Code: Select all

# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=/dev/sdc
For 64 bits linux :

Code: Select all

# dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sdc
INSTALL EXTLINUX INTO ONE USB PARTITION
For example partition /dev/sdc3 (can be FAT12/16/32, NTFS, ext2/3/4, Btrfs)
- Set the partition to "BOOTABLE" (with gparted or another tool)
- Mount the partition :

Code: Select all

# mkdir -p /mnt/sdc3
# mount /dev/sdc3 /mnt/sdc3
- create boot and extlinux folders

Code: Select all

# mkdir -p /mnt/sdc3/boot
# mkdir -p /mnt/sdc3/boot/extlinux
- Install extlinux

Code: Select all

# extlinux -i /mnt/sdc3/boot/extlinux
COPY PUPPY FILES TO THE PARTITION
- Download the puppy linux iso, for example Precise-5.7.1
- Mount the puppy linux iso (click it in ROX for example, or use mount)
- Create a new directory "Prec-5.7.1" in mounted partition /mnt/sdc3/
- Copy all files from iso to folder in partition /mnt/sdc3/Prec-5.7.1/

You can do this with as many puppies as you like to. For example puppy-2 .

CREATE THE CONFIGURATION FILE
- Create a new blank file called extlinux.conf in /mnt/sdc3/boot/extlinux/ :

Code: Select all

TIMEOUT 100
PROMPT 1
DEFAULT distro1
SAY Type distro1 for Precise 5.7.1
SAY Type distro2 for Puppy 2
LABEL distro1
  KERNEL /Prec-5.7.1/vmlinuz
  APPEND initrd=/Prec-5.7.1/initrd.gz
LABEL distro2
  KERNEL /puppy-2/vmlinuz
  APPEND initrd=/puppy-2/initrd.gz
- Unmount the USB partition :

Code: Select all

# umount /dev/sdc3
- Restart the PC to boot from USB first (check BIOS options)

-
Last edited by linuxcbon on Fri 27 May 2016, 16:04, edited 19 times in total.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

This isn't really a How-to yet. How about posting both of them in the HOWTO forum? Only in separate threads, one for syslinux and one for grub4dos.

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#3 Post by linuxcbon »

Ok I updated with syslinux howto.
Let me know if it works for you.

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#4 Post by neerajkolte »

Nice one @linuxcbon,

I will try this out.
Thanks.

Edit: For next puppy do I only need to add last 3 lines in syslinux.cfg , for example if I added Fatdog, should my cfg file be like...

Code: Select all

TIMEOUT 50 
PROMPT 1 
DEFAULT Precise5.7.1 
LABEL Precise5.7.1 
  KERNEL /Precise-5.7.1/vmlinuz 
  APPEND initrd=/Precise-5.7.1/initrd.gz

LABEL Fatdog 
  KERNEL /Fatdog/vmlinuz 
  APPEND initrd=/Fatdog/initrd.gz
- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#5 Post by linuxcbon »

neerajkolte wrote:Edit: For next puppy do I only need to add last 3 lines in syslinux.cfg , for example if I added Fatdog, should my cfg file be like...
- Neeraj.
hi Neeraj,
yes it should work easily, try it out and let me know if any bugs or problems.
cheers

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#6 Post by neerajkolte »

Here is how my syslinux.cfg looks

Code: Select all

say Type "fatdog631" or "tahrpup584" with kernel parameters, or just press Enter for default boot.
default fatdog631
timeout 50
prompt 1
label fatdog631
kernel /fd631/vmlinuz
initrd /fd631/initrd
append waitdev=0 base2ram=yes basesfs=device:sda7 savefile=ram:device:sda7:/fd64save

label tahrpup584
kernel /tahrpup584/vmlinuz
append initrd=/tahrpup584/initrd.gz
This works nicely.
Only trouble is if I want to boot tahrpup, I have to type tahrpup584 and press enter.
I could shorten the label, but I wish it had selectable entries with arrow keys. Maybe I should read it's wiki.

Anyway I like syslinux, it seems simple and efficient. My fatdog gets to working desktop in 10sec flat...

Have you by any chance taken a look at EXTLINUX. It seems similar and boots from Linux ext2/ext3/ext4, XFS, Btrfs, or UFS/UFS2 filesystems. FAT and NTFS are also supported.

I was thinking to format my usb stick to ext4 with journaling disabled.

Thanks.

- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#7 Post by linuxcbon »

You have to type the label, but it's easy. Extlinux is for ext partitions. I chose fat32 because it can be read from windows too. No need for a guide for each format, they all work the same.

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#8 Post by neerajkolte »

If you look at Screenshots, it seems there are some graphical menu options

I will look further tomorrow. Now got to sleep.

Thanks.

- Neeraj
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#9 Post by linuxcbon »

neerajkolte wrote:If you look at Screenshots, it seems there are some graphical menu options I will look further tomorrow. Now got to sleep. Thanks. - Neeraj
Yes I know, there are menus, but I am not going to explain them in the howto, because I want to keep it minimal. If people want more options, they can read the documentations. :wink:

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

#10 Post by Galbi »

linuxcbon wrote:If people want more options, they can read the documentations. :wink:
Hey! no, no, no... we want everything chewed and predigested...

:D just kidding...

Thanks for the tutorial, I've downloaded X-salacko .iso so I will try it in a SD card.
Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

Re: How to manually make Puppy boot from a USB stick = SYSLINUX

#11 Post by neerajkolte »

A note to Fatdog users.
In fatdog mbr.bin is not at /usr/lib/syslinux, but at /usr/share/syslinux.
So Insted of

Code: Select all

# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=/dev/sdb
Use This

Code: Select all

# dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sdb
Thanks.

- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#12 Post by linuxcbon »

hi,
I added more examples in the config file, and some "SAY" lines for booting easier with a list to chose from.
Cheers

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

type 1, 2, or 3

#13 Post by raffy »

neerajkolte wrote:

Code: Select all

label tahrpup584
kernel /tahrpup584/vmlinuz
append initrd=/tahrpup584/initrd.gz
This works nicely.
Only trouble is if I want to boot tahrpup, I have to type tahrpup584 and press enter.
Try using menu.txt that contains

Code: Select all

1 - Fatdog

2 - Tahrpup
and add at the top of syslinux.cfg

Code: Select all

prompt 1
display menu.txt
Your label will therefore be

Code: Select all

label 1
... Fatdog entries...

label 2
... Tahrpup entries...
Then you only type "2" when using Tahrpup instead of the default 1 (Fatdog).
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#14 Post by neerajkolte »

Thanks raffy,
my syslinux.cfg reads

Code: Select all

say Type "1" followed with kernel parameters for Fatdog631.
say Type "2" followed with kernel parameters for Fatdog700b2.
say Type "3" followed with kernel parameters for Tahrpup 6.0 CE.
say OR just press Enter for default boot.
default 1
timeout 50
prompt 1
label 1
kernel /fd631/vmlinuz
initrd /fd631/initrd
append waitdev=0 base2ram=yes basesfs=device:sda7:/fd631base/fd64-630.sfs savefile=ram:device:sda7:/fd631save

label 2
kernel /fd7b2/vmlinuz
initrd /fd7b2/initrd
append waitdev=0 base2ram=yes basesfs=device:sda7:/fd7b2base/fd64.sfs savefile=ram:device:sda7:/fd7b2save

label 3
kernel /tahrpup6/vmlinuz
initrd /tahrpup6/initrd.gz
append pmedia=atahd pupsfs=sda8:/tahrbase-6/puppy_tahr_6.0.sfs zdrv=sda8:/tahrbase-6/zdrv_tahr_6.0.sfs pupsave=sda8:/tahrbase-6/tahrsave-6
This works nicely, but I will play with your suggestion too.

Thanks.

- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

Keisha
Posts: 469
Joined: Tue 18 Nov 2014, 05:43

unicornpup can be booted from f2fs using syslinux

#15 Post by Keisha »

Unicornpup frugal install can be booted from f2fs using syslinux. I'm posting from it now, it's nice and fast:

http://murga-linux.com/puppy/viewtopic. ... 598#827598
“A wise man can learn more from a foolish question than a fool can learn from a wise answer.â€￾ --Bruce Lee

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#16 Post by don570 »

To linuxcbon...

You should emphasize - Format the partition to FAT32
since the method won't work unless the partition is newly formatted.
Continuous packing of data is needed so the partition can't have
previous data on it.

_______________________________________________________

linuxcbon
Posts: 1312
Joined: Thu 09 Aug 2007, 22:54

#17 Post by linuxcbon »

don570 wrote:To linuxcbon...
You should emphasize - Format the partition to FAT32
since the method won't work unless the partition is newly formatted.
Continuous packing of data is needed so the partition can't have
previous data on it.
_______________________________________________________
no,it doesnt matter, syslinux (isolinux, extlinux etc) can work with any kind of partitions fat, ntfs, ext, cdroms etc and it doesnt need to be formatted...I only wrote that for simplication only.

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

#18 Post by corvus »

linuxcbon wrote:
don570 wrote:To linuxcbon...
You should emphasize - Format the partition to FAT32
since the method won't work unless the partition is newly formatted.
Continuous packing of data is needed so the partition can't have
previous data on it.
_______________________________________________________
no,it doesnt matter, syslinux (isolinux, extlinux etc) can work with any kind of partitions fat, ntfs, ext, cdroms etc and it doesnt need to be formatted...I only wrote that for simplication only.
I followed your instructions step by step except for formatting, I used ext4, and when I typed:

Code: Select all

syslinux /dev/sdc1
I got the following error:

Code: Select all

/dev/sdc1: invalid media signature (not an FAT/NTFS volume?)
:?

Greetings
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#19 Post by drunkjedi »

Hi corvus,
For ext file systems you have to use extlinux.
Syslinux for fat.
Isolinux for cd or dvd.

I haven't used it. But command syntax for using syslinux and extlinux is same I think.

Please see it's wiki first.
http://www.syslinux.org/wiki/index.php?title=EXTLINUX

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

#20 Post by corvus »

Thanks drunkjedi for the explanation and for the link, have been helpful. :)

Greetings.
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

Post Reply