Puppy Linux legacy boot EASY

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

Puppy Linux legacy boot EASY

#1 Post by foxpup »

Instead of using an Installer (script) you can easily do this manually.
Take full control and install manually. That allows to install any Puppy version from any Puppy.

This is for legacy boot.
This is for a pendrive (usb) or a (internal) HD drive.


1. Use gParted to partition and format your drive as you like.
I suggest:
(1) small 'boot partition', fat32, 'boot' flag, 100-200M
(2) partition to install Puppys, ext3 or ext4, a few GB
(3) others as you like
If you already have another Operating System on your drive and you want to keep it,
be carefull with this, not to wipe it.
Do not make a new boot partition, there should be one already. (Look for the boot flag.)


2. Install Puppys to (2)
(4) make a folder on (2) for each Puppy
open (click) the iso of that Puppy
copy (drag) vmlinuz, initrd.gz and all .sfs from iso to folder (4)

3. Use Grub4Dos bootloader config
left: choose the drive as the device to install bootup loader on MBR
right: options:
search on all devices
rewrite menu.lst
rewrite the existing boot record (=mbr)
OK

grldr and menu.lst will be on (1) because it is flagged.

4. reboot
you may have to go into your BIOS to set the boot order.

If you want to add another Puppy (or more Puppys) repeat 2-4 with 1 difference:
do not rewrite the existing boot record.
You can place another Puppy in its folder on (2), (3) or even on another drive (device).

Once you know this easy procedure it only takes 2 minutes.

If you need this for an UEFI boot look here:
Puppy Linux UEFI boot EASY from Limbomusic.
Last edited by foxpup on Sun 15 Dec 2019, 10:48, edited 2 times in total.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#2 Post by rufwoof »

You don't have to have two partitions, a dos/fat and ext, grub4dos will directly install/work to/from ext

I solely use a usb stick to boot.
Format it as ext3
Install grub4dos
Create a unique folder for each Puppy and its save files/folder
Manually edit menu.lst to add that Puppy (the tricky part) as different Puppy's use different boot options.

Mostly I set a Puppy to only ever save on demand, set the Event Manager's Save Session Interval to 0 (zero), and more often once I've configured things as I like I just boot, use, shutdown without saving. I also set Puppy's to load everything into ram, as I prefer to disconnect the usb once booted to physically isolate the MBR/bootloader/kernel ...etc. out of harms way.

More recently I've reduced down to just a single small kernel that boots by default that has wifi net connected, OpenSSH, mc and kexec ... and I use kexec to load up (boot) any other kernel/puppy. 13MB combined vmlinuz and initrd - so boots very quickly even from usb. But is cli only (often all I need as I can ssh into other boxes to run irc, email, w3m (textual style browser) ...etc.). The small size is a function of having no external modules or firmware, that's all built into the kernel.

With kexec the format/action to boot another kernel/puppy looks like ...

kexec -l fatdog-vmlinuz --initrd=fatdog-initrd.xz
kexec -e

where the first command loads the kernel and the kexec -e command executes (boots) it.

The nice thing of having a early boot (13MB) with wifi net connection and ssh is that you can ssh into a box with pre-defined ssh keys, so if a man in middle attack is being deployed against you then that's immediately flagged. Handy for when you're out and about using public wifi hotspots. The benefits of disconnecting the usb immediately after booting is that a in-session crack can't get at your MBR/bootloader/kernel.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#3 Post by nic007 »

I would install the bootloader on the usb drive and not touch the MBR of the HD.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

I do that. Grub4dos is on the USB flash drive.
Select USB drive as device to install on.
You don't have to have two partitions, a dos/fat and ext, grub4dos will directly install/work to/from ext
This is not so Grub4dos will work.
Some computers have a bios setup, that will not see a none fat32 format as a boot-able device.
More about external drives being seen as boot-able device

A USB flash drive with several Puppy versions on it.
Grub4dos boot loader on the USB drive to boot them.
Anytime I add or remove a Puppy version.
Simply run Grub4dos Bootloader config, to make a new boot menu, with what is now on the storage device.
Also, good idea to select search only within this device. This keeps the menu from having stuff about all storage devices external and internal.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#5 Post by foxpup »

rufwoof wrote:You don't have to have two partitions, a dos/fat and ext, grub4dos will directly install/work to/from ext

I solely use a usb stick to boot.
Format it as ext3
Install grub4dos
Create a unique folder for each Puppy and its save files/folder
Manually edit menu.lst to add that Puppy (the tricky part) as different Puppy's use different boot options.
This is true.
And here is another reason to do it this way:
I have an Asus that does not want to boot from a pendrive that has more than 1 partition.

In the first post of this thread,
I wanted to mimick the setup of UEFI boot with a fat/esp partition that has the boot installation/modules.
No need to do that.

cretsiah
Posts: 108
Joined: Sat 24 May 2008, 15:28

#6 Post by cretsiah »

@foxpup

This is pretty much what i did on the toshiba satelite L30 laptop (the other thread ) except it wasnt grub4dos and hard drive partitioned all ext3 lol as i said.
http://www.murga-linux.com/puppy/viewto ... 84#1060484

just dropped the correct files into folders, probably could have just done the iso images instead now i think about it.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#7 Post by foxpup »

cretsiah wrote:just dropped the correct files into folders, probably could have just done the iso images instead now i think about it.
It doesn't matter where the correct files come from.
If you get them from the .iso, downloaded from a reliable source and checked with hash, you can be pretty sure they are reliable.
That is the only reason.
But the files you want are not easily written to, so you can rely on it they have not changed.
This is pretty much what i did on the toshiba satelite L30 laptop (the other thread ) except it wasnt grub4dos and hard drive partitioned all ext3 lol as i said.
But your menu.lst looks like grub4dos. Are you sure?
There was grub as well, at the time, but I don't know anything about it.

cretsiah
Posts: 108
Joined: Sat 24 May 2008, 15:28

#8 Post by cretsiah »

yeh its grub (not grub2)

from memory at the time the only difference between grub4dos and grub (well maybe 2 differences)

grub4dos tended to a lot easier/nicer on windows boot loaders than grub, it was 2 files and from memory you could just drop them in and drop them out with out much hoo haa from windows. but the grub had multiple staging and a few extra files (even though you only generally touched one - the menu.lst)

Im going to hate it when i cant use mbr boot anymore :( , from what ive seen in various forums about grub2 and windows uefi, they both like to screw things up, both like to rebuild themselves with every update, what a bleeding nightmare.

there is a forum member here ( i wont mention names incase I embarrass them) that showed (or tried to show me some very interesting tricks ) with grub4dos. unfortunetly i lost most of the notes in relation to that but i do remember being in aww of what he could make it do lol

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#9 Post by enrique »

Yes master chenall last commit to grub4dos was on 2016. And even it was open source no one had taken the responsibility. Truth is grub-0.97 (GRUB Legacy) stop developed 2009. And as grub-0.97 been the source for the code then grub4dos stop too.

But there is a looootttt than can be done to improve it. MBR size was 512 because previous of 2009 ALL Disk where mostly using 512 bytes per sectors. But in reality this is not true today. In fact there is no real standard. So to prevent conflict industry created 512-byte Emulation (512e). But in reality your drive most likely 4KB is Native. This create the uglyl situation that The partition is not aligned to a physical sector boundary Making your drive slow. gparted like many others adopted a half way, 2KB = 2048 bytes per sector. I do not how this improve is 4KB is what is native, to me The partition STILL not aligned to a physical sector boundary. But I do leave that to the experts. I know a lot of blablabla.

Now here is the Important.
But as RESULTS MBR occupy 0-512 and 1rst boot sector start at 2048? Yes this means that Like Christopher Columbus I discover NEW LAND and boys and girls I enrique is claiming all that to me.... ;)

So to conclude I can build my special grub4dos that can utilize enrique's new found unclaimed land to make improves for those troubled disk situations.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#10 Post by rockedge »

Hello enrique,

interesting find. must test out the idea. Does it work?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

The current default behaviour of Gparted is to create new partitions starting on MiB boundaries. This makes it compatible with drives that work in 4K blocks.

But even when the standard was to create partitions on cylinder boundaries, there was always free space between the MBR and the first partition.

Grub4Dos already uses this space. That's why you can't put G4D on a GPT-structured drive - GPT uses that space too.

However, you can put Legacy GRUB on a GPT drive because its bootloader code fits entirely in the 512bye MBR sector.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#12 Post by enrique »

@foxpup
We are some what on target as this are grub4dos issues " legacy boot". But not necessary "EASY".

@rockedge
Yes & No. It s only a possibility. Well I have done some test to used it. Just to make sure, this is not the first time I mention it. Leaving HDD memory not mapped in the 90's was consider BAD thing as it was the place some virus truly hide. As it is not part of any Partition then it is not scan!!! ;) And why it happened? I guess the industry thought ALL of use will move to GPT. And GPT as rcrsn51 mention used that space. Well kind of, in fact as result of GPT there are more empty spaces.

@rcrsn51 I do not know you, but I do admire you even when some time you sound strong or rude. See, in the last month I had posted about 4-5 things that where half true. No buddy complained until you now.

I know only basics on GPT. To make it flexible GPT is base not in 512 sectors but in so called LBA sectors ( this mean to me ANY size). So GPT in fact have many more places fill of "0", no man land. So even more possibilities for hackers.
The current default behavior of Gparted is to create new partitions starting on MiB boundaries.

I am pretty sure I had only seen 2048. I guess I need to check that uhmmm... ***Edit I think we use 0.32. But new release GPARTED 0.6.0 read 1MB.
there was always free space between the MBR and the first partition.

That I know originally the boot sector was at 512. Right after MBR. ***Edit. I guess that after a quick review I have to admit that once HDD became standard it came defining "Track 0" at 63 Sectors. And only Floppys used that area for Fat12 info.
Grub4Dos already uses this space

Waoo I do not know what to say here. That I know 1rst & 2nd stage only used Bootstrap code area or 1rst 446 bytes. But I have to check on that wee. And even then, try to think how grub4dos will then be able to work when this space is not available. Yes I consider wee 2nd stage and glrdr 3rd stage. Again, I guess I need to check that uhmmm... ***Edit I have to study this one more, but it seems that at one point grub4dos included part of wee and this part may be store at sectors 1-63

Conclusion, No enrique did not discover new land. Many including rcrsn51 knows about that. But in the blogger era everyone keep repeating the same thing without analyzing what they say. And in the process many forget this spaces are there and they can be use, not as a partition but we can directly/manually read and write them.

Edit after some quick check on the net I had to admit that I was wrong on some of my old views. I had added review with ***Edit

Post Reply