How to replace host OS of frugal Puppy installation?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
shanper
Posts: 2
Joined: Fri Feb 17, 2023 7:45 am

How to replace host OS of frugal Puppy installation?

Post by shanper »

Hello Everybody,

I am running a Ubuntu on /dev/sda1 which is the bootable volume.

Recently I frugal installed Puppy Linux BionicPup32 19.03 on /dev/sda4.
Boot loader is set to GRUB4DOS.
I find that Puppy packs a punch! Kudos for the developers...

Now I want to format the boot volume and install some other OS instead of Ubuntu.
I do not have access to USB or CD/DVD.
So everything needs to be done in frugal Puppy I guess.
I would like to know how should I proceed.

Thanx.

User avatar
mikewalsh
Moderator
Posts: 5722
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 627 times
Been thanked: 1769 times

Re: Remove Host OS of Frugal Puppy installation

Post by mikewalsh »

@shanper :- Hallo.....and :welcome: to the "kennels".

I don't think you can do that. I'm pretty certain if Puppy is on sda4, and you want to modify/change/alter sda1, then gParted will throw a fit.......because it will insist on every partition above it being deleted first.

I could be wrong. I'd wait for some of the others to turn up.......and see what they have to say.

(Um...can you explain exactly what you mean by "I do not have access to USB or CD/DVD"..? Not at ALL? If not, then you've got problems; what YOU want to do needs to be done from a second, external OS.....because the main drive will need to be unmounted before gParted will let you do anything with it. And if it's unmounted, then you can't run anything from it.... )

You've got something of a "chicken & egg" situation here, by the looks of things..! :shock:

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

geo_c
Posts: 2648
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1911 times
Been thanked: 752 times

Re: Remove Host OS of Frugal Puppy installation

Post by geo_c »

mikewalsh wrote: Fri Feb 17, 2023 10:07 am

@shanper :- Hallo.....and :welcome: to the "kennels".

I don't think you can do that. I'm pretty certain if Puppy is on sda4, and you want to modify/change/alter/ sda1, then gParted will throw a fit.......because it will insist on every partition above it being deleted first.

I could be wrong. I'd wait for some of the others to turn up.......and see what they have to say.

(Um...can you explain exactly what you mean by "I do not have access to USB or CD/DVD"..? Not at ALL? If not, then you've got problems; what YOU want to do needs to be done from a second, external OS.....because the main drive will need to be unmounted before gParted will let you do anything with it. And if it's unmounted, then you can't run anything from it.... )

You've got something of a "chicken & egg" situation here, by the looks of things..! :shock:

Mike. ;)

Can't he run Bionic in ram with no savefile, then run gparted, format the drive, and re-install Bionic before even shutting down? Of course that means deleting his current Bionic install.

geo_c
Old School Hipster, and Such

williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

Re: Remove Host OS of Frugal Puppy installation

Post by williwaw »

shanper wrote: Fri Feb 17, 2023 7:55 am

Now I want to format the boot volume and install some other OS instead of Ubuntu.
I do not have access to USB or CD/DVD.

you say you do not have "access". does this mean.....

you do not have a USB drive to use?
you do not have a working usb port?
you do not have physical access to the machine?

what OS do you wish to install to sda1?
and how do you plan to install it?

what filesystem reformatting is desired on sda1 and why?
or do you just wish to move the boot flag to sda4?

sorry for so many questions, but just trying to understand more about what you wish to accomplish before advising.

User avatar
Keef
Posts: 254
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 68 times

Re: Remove Host OS of Frugal Puppy installation

Post by Keef »

@shanper
If the plan is to have Bionic on sda1, then no formatting needed. Set up a Bionic directory on sda1, copy the contents of your current one, apart from the savefile or save folder. You could try, but it will throw up errors.
Add an entry to menu.lst to point at the new install.
Leave everything else as is for now.
If you can boot into the new Bionic, you can delete all the Ubuntu stuff, just be careful not to remove any grub4dos files.
You could then copy the old savefile/folder and reboot.
You could also use the puppy installer from the current Bionic, but I have always done this sort of thing manually.

Geek3579
Posts: 253
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 64 times

Re: Remove Host OS of Frugal Puppy installation

Post by Geek3579 »

Hi @shanper,

If you install another linux OS, the odds are that the installer will wipe any and all partitions in the process, including any puppy os frugal installs. Not a good idea if you want to keep your current puppy accessible. Of course, you can save your savefolder and frugal files first, and then copy then back on a new installation.

Leaving partitions as they are means you can run MANY other puppy OS with frugal installations in any partition. Just add files and change the boot script. You just need enough space on the drive.

If you still want to try out other Linux OS, another suggestion is to run QEMU in a puppy OS and virtualise any new OS, but its awkward to use.. VirtualBox is better for beginners/easier to use, but needs a bit of tweaking to set up in puppy OS, but it runs really well. The setup information is available on the forum somewhere.

shanper
Posts: 2
Joined: Fri Feb 17, 2023 7:45 am

Re: How to replace host OS of frugal Puppy installation?

Post by shanper »

@mikewalsh Thank you for the warm :welcome:.

It is nice to see a active forum.
@mikewalsh, @geo_c, @williwaw, @Keef, @Geek3579 I'll try to answer all the questions here...

@Geek3579 Suggested using virtual machines. But my ancient laptop doesn't support virtualization.

My DVD drive is broken and I do not have a USB stick. It doesn't feel good to buy a USB stick just for this purpose. Because according to this article, we could boot from Live ISO file using GRUB & internal HDD (without external USB/CD)

Replying to @williwaw

you say you do not have "access". does this mean.....
you do not have a USB drive to use? I do not have one
you do not have a working USB port? Let's say I don't
you do not have physical access to the machine? Let's say I don't
what OS do you wish to install to sda1? A Linux OS (Not finalized yet. Welcome your suggestions.)
and how do you plan to install it? boot from Live ISO file using GRUB
what filesystem reformatting is desired on sda1 and why? ext4
or do you just wish to move the boot flag to sda4? No idea...

I could go out and buy a USB stick. But unfortunately, as always the geek in me says "No" to it. Because we could use the above mentioned install OS using the GRUB method. And most importantly, this is a valid use case and would be able to help many people who could come across this situation in the future.

So shall we all pitch in and approach this as a case study to Replace existing OS without external hardware support?

I would like to format the first physical volume which is the main OS is in to get rid of junk files accumulated over time.

The steps for the installation process would be afaik:

  1. Download the relevant Operating System ISO file to a volume other than the first physical volume.

  2. Change the boot flag to some other physical volume. (As suggested by @williwaw )

  3. Move the GRUB4DOS file to the volume selected in the previous step.

  4. Format the first physical volume.

  5. Use load ISO from the GRUB method to install the new OS on the first physical volume.

  6. Voila... the new resident moved in! And there is also the adorable pet that lived with the previous resident.

This may or may not be the correct approach or there may be steps that need to be changed. Anyway, please put your two cents(or as of now 83.81 Satosis) in. :thumbup:

User avatar
mikewalsh
Moderator
Posts: 5722
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 627 times
Been thanked: 1769 times

Re: How to replace host OS of frugal Puppy installation?

Post by mikewalsh »

@shanper :-

Mm. Uh-huh. Well, it's not the first time somebody's asked this......and I don't suppose it's going to be the last time, either.

Puppy's defult bootloader is Grub4DOS, which is a modified form of the old legacy GRUB. It doesn't support the 'loop' parameter required for booting directly from an ISO file. There is a different bootloader developed by Shinobar, Grub2config, which may or may not support the required 'loop' parameter:-

viewtopic.php?t=3360

I've never tried it, so can't comment. But I agree with some of the others:-

  • - IF you're intending to replace what's on sda1 with Puppy, it's simple.....because a 'frugal' Puppy will run from within a sub-directory on that partition. A 'mainstream' distro, however, will expect to wipe and re-format the entire disk, because that's how their installers are built to work. I'm not at all certain if you could run a Puppy in RAM while deleting the very files it's just booted from......

    (I'll defer to the judgement of others here. It MAY be possible.)

  • - For a Puppy, follow Keef's instructions above. Once Puppy is installed and working, you can then manually delete everything you DON'T want outside the Puppy directory.....with the exception of the bootloader items.

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
mikeslr
Posts: 2854
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 173 times
Been thanked: 867 times

Re: How to replace host OS of frugal Puppy installation?

Post by mikeslr »

@ shanper.

Thinks of a USB-Key as a tool. They come in handy when you want to try something without modifying your working operating system. They are indispensable when you are attempting something which can turn your computer into a paper weight. Among those somethings are (1) reformatting the partition on which your operating system resides and (2) changing your boot-loader. Being able to boot an operating system from a USB-Key after you've done something to the hard drive which rendered all operating systems on it inoperable can be thought of as a safety net. But it also provides far more flexibility with what you can do with the computer itself.
There are a couple devs on the Forum who repair computers. Puppy-on-a-stick is an essential part of their tool-kit.
That it can be done doesn't mean it should be done. I've read reports of cats falling out of windows on the 12th floor and landing safely on their feet. Forcing cats out of a high level windows is still not recommended.
A USB-Key doesn't have to be large. Puppys don't take up much room. I actually find having a couple GOOD QUALITY keys such as the 8GB SanDisk --on ebay for $4.85 each-- provides greater flexibility than one large Key.

But you may have other options. Tell us more about what you now have. How large is sda1 from which Ubuntu boots? Is it an encrypted partition? Do you know how it is formatted: i.e., is it Linux Ext4 64bit? If you don't know the answer to that, telling us which version of Ubuntu is installed, created it, would help.
Puppys are designed to co-exist with any other operating system. So you may be able to do the following:

1) Install grub2config, https://www.forum.puppylinux.com/viewto ... 703#p29703 in your Puppy on sda4
5) run grub2config
grub2config will over-write your current boot-loader but should enable you to boot into either Ubuntu and Puppy now on sda4. [Should is an iffy word; why I recommend having a backup plan].
6) Having booted into that Puppy you can then manually delete --not reformat the drive-- everything from sda1 NOT relating to your new boot-loader. The last part is tricky. Ask for specific advice as to what not to delete. Best provide a screenshot of what your sda1 looks like just before you start deleting.
6a) Probably safer. Since you're using Puppy to do the deletion and you've installed grub2config into it, after the deletion --before you shut down-- run grub2config again.
7) Once you can boot into Puppy on sda4, you can add any Puppy on sda1, including another instance of BionicPup32 19.03. Puppys only need there own folder. Just give that folder a unique name --e.g. bionic2-- so that on boot-up it can be distinguished from the other.

Run grub2config again so that it will have a menu entry for the newly added Puppy.

Edit grub2config's title for it to something like:

menuentry 'Bionic on sda1 (sda1/bionic2)'{

grub2config creates a TEXT file named grub.cfg. You could manually edit any written by grub2config rather than running grub2config again. Editing it is safer --see my first paragraph-- if you know how. Safer because you're only changing a text file rather than writing several files and executables. Ask for specifics. But my general advice is edit twice. The first time just add another stanza. Don't delete or change one you know works. Boot up selecting the new stanza. It successful, you can edit again to change/delete the old.

An example of a full grub.cfg stanza might look something like this:

menuentry "Puppy bionicpup32 8.0" {
search --no-floppy --fs-uuid --set 39ff128d-806e-45a0-9c0c-4013859ec05d
echo "Loading vmlinuz"
linux /bionic32/vmlinuz pmedia=ataflash pdrv=39ff128d-806e-45a0-9c0c-4013859ec05d psubdir=/bionic32 pfix=fsck,fsckp
echo "Loading initrd.gz"
initrd /bionic32/initrd.gz
}

Some of the above isn't necessary. And there are other arguments which could be included. grub2config wrote the uuid and pdrv specifics.

williwaw
Posts: 1714
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 152 times
Been thanked: 311 times

Re: How to replace host OS of frugal Puppy installation?

Post by williwaw »

mikewalsh wrote: Fri Feb 24, 2023 11:21 am

@shanper :-

IF you're intending to replace what's on sda1 with Puppy, it's simple.....because a 'frugal' Puppy will run from within a sub-directory on that partition. A 'mainstream' distro, however, will expect to wipe and re-format the entire disk, because that's how their installers are built to work.

For a Puppy, follow Keef's instructions above. Once Puppy is installed and working, you can then manually delete everything you DON'T want outside the Puppy directory.....with the exception of the bootloader items.

you might be able to find a mainstrean distro whos installer will let you install to the existing sda partition instead of reformatting the disk,

but it would be prudent to back up your existing Puppy savefile to a different disk which seems outside your constraints.

you can install multiple puppys to either or both partitions and keep grub4dos

Post Reply

Return to “Beginners Help”