How does Debian Dog know what partition to use?

a very small Live CD shaped to look and act like Puppy Linux.

Moderator: fredx181

Post Reply
Luluc
Posts: 61
Joined: Mon Feb 26, 2024 3:13 am
Has thanked: 32 times
Been thanked: 3 times

How does Debian Dog know what partition to use?

Post by Luluc »

It's not necessary, but someone may want to read this thread for additional context:
viewtopic.php?p=121253

DebianDog-Bullseye-20201127 refused to install on sda1 but for some mysterious reason accepted sda2. Both are formatted with the BTRFS so it doesn't make sense. But sda2 is not sustainable for me. It has very little free space. So I tried this trick.

I am booting Debian Dog with this Grub entry:

Code: Select all

menuentry "DebianDog.iso" {
  insmod ext2
  linux (hd0,2)/live/vmlinuz1  from=/ noauto changes=/live/changes video=SVIDEO-1:d 
  initrd (hd0,2)/live/initrd1.xz
}

So I copied the /live directory across partitions and changed the Grub entry:

Code: Select all

menuentry "DebianDog.iso" {
  insmod ext2
  linux (hd0,1)/live/vmlinuz1  from=/ noauto changes=/live/changes video=SVIDEO-1:d 
  initrd (hd0,1)/live/initrd1.xz
}

Same thing, only different partition, (hd0,1).

Debian Dog booted, but I installed something to it and rebooted into another Linux (the one I'm using right now).
Checking the /live directory in both partitions, it is clear that changes were applied to sda2 although it booted off sda1. I know because I saw (hd0,1) in the boot sequence output.

Well, the /live directory in sda1 is a copy of /live in sda2 so I have to assume there is something in there that still points to sda2. Do you people what that is? I want to hack it and have Puppy running on sda1. I don't have other choices.

Last edited by Luluc on Sun Jun 02, 2024 12:40 am, edited 1 time in total.
User avatar
mikeslr
Posts: 2952
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 909 times

Re: How does Puppy know what partition to use?

Post by mikeslr »

Best asked on the debiandog SubForum, https://www.forum.puppylinux.com/viewforum.php?f=46. While this, the Puppy Linux Discussion Forum, supports any portable, modular operating system, its primary focus is Puppy Linux. These are created using Woof. DebianDogs are not. IIRC, they are created beginning with a debian 'net-install', then fashioned to work similar to Puppys; the operative term being similar.

If you don't get an answer to your question:
since DebianDog-Bullseye-20201127 (a) boots from sda1 and (2) you aren't going to use the version on sda2 for anything I'd delete everything from sda2 AND the live/changes directory on sda1 in order to create a new live/changes directory, starting from scratch.

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

Re: How does Puppy know what partition to use?

Post by mikewalsh »

Topic moved to "DebianDogs" as requested...

Mike. ;)

User avatar
fredx181
Posts: 3051
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 371 times
Been thanked: 1297 times
Contact:

Re: How does Debian Dog know what partition to use?

Post by fredx181 »

@Luluc
First, always make sure that there isn't same folder name ("live" in your case) on two different partitions as it may conflict with each other.
To be on the safe side it's best to create a folder with unique name, let's say "bulls_eye" and move the "live" foider in there (so you get /bulls_eye/live)
Also it may be best to use UUID , example: (replace the large uuid string (also at from= and changes=) with what blkid gives you for the partition containing "bulls_eye/live")

Code: Select all

menuentry "Bullseye (in bulls_eye)" {
insmod ext2
search --no-floppy --fs-uuid --set=root 34b10665-11c5-493c-9bff-f4f1e7db86f2
linux /bulls_eye/live/vmlinuz1 noauto from=UUID:34b10665-11c5-493c-9bff-f4f1e7db86f2/bulls_eye/ changes=UUID:34b10665-11c5-493c-9bff-f4f1e7db86f2/bulls_eye/live 
initrd /bulls_eye/live/initrd1.xz
}

No need btw to specify "bulls_eye/live/changes" , "bulls_eye/live" is enough, the changes folder will be automatically created there.
edit: you can also point your changes to another partition using uuid, e.g. changes=UUID:<long-uuid-string>/ (then the changes folder will be at the root of that partition)
edit: can't comment on using BTRFS and encryption, I never used it.
edit: probably the installer does not have real support for BTRFS, that could explain why it fails to install to sda1.

Luluc
Posts: 61
Joined: Mon Feb 26, 2024 3:13 am
Has thanked: 32 times
Been thanked: 3 times

Re: How does Debian Dog know what partition to use?

Post by Luluc »

fredx181 wrote: Sun Jun 02, 2024 10:42 am

edit: probably the installer does not have real support for BTRFS, that could explain why it fails to install to sda1.

That is not the reason. I found out the reason and reported it in my other thread:
viewtopic.php?t=11698

Luluc wrote: Sun Jun 02, 2024 12:49 am

I solved the mystery.

It turns out I am not booting off a CD or pen drive. I am booting off ISO images stored on sda1 right from Grub. That causes DebianDog to boot with sda1 mounted. Then I guess the installation script cannot understand that. When it tries to mount sda1 to copy the persistence data over, it certainly gets some error because sda1 is already mounted, and the script fails.

I solved it by moving the ISO image to sda2 and updating the Grub entry accordingly. Then DebianDog installed on sda1. Even though sda1 is BTRFS. Come on, people. BTRFS is nothing new. It's pretty awesome too.

Anyway, on the first boot it still booted into the sda2 persistence data! What in the world??!!

So I deleted the persistence data on sda2 and rebooted, and everything finally worked the way I wanted. Well, almost. I am still on a naked partition, no encryption. That sucks.

User avatar
rockedge
Site Admin
Posts: 6525
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2736 times
Been thanked: 2616 times
Contact:

Re: How does Debian Dog know what partition to use?

Post by rockedge »

BTRFS is nothing new. It's pretty awesome too.

Yes it has been around.....but had many bugs and was not stable until recently. Since Puppy Linux basic design using a save folder or save file already has a "rollback" function of sorts and a snapshot feature already in pupmode 13 with save persistence changes on command, it wasn't (isn't) pressing enough to develop using it more.

Luluc
Posts: 61
Joined: Mon Feb 26, 2024 3:13 am
Has thanked: 32 times
Been thanked: 3 times

Re: How does Debian Dog know what partition to use?

Post by Luluc »

rockedge wrote: Mon Jun 03, 2024 3:05 pm

BTRFS is nothing new. It's pretty awesome too.

Yes it has been around.....but had many bugs and was not stable until recently.

Not true, only on RAID. I have been using it for 8 years, never had a problem. I've had data loss multiple times on ext3, ext4 and xfs. Only once on btrfs because of a hard reset.

Post Reply

Return to “DebianDogs”