Page 1 of 1

Debian bootstrap installing

Posted: Thu Mar 06, 2025 6:29 am
by Hypex
Hi guys.

So today I tried the debootstrap utility to bootstrap a fresh Debian system install from scratch. I've been aware of this for a number of years but never actually tried it. The state of PPC declining in recent years didn't encourage me to try, but with wanting to setup up Debian on my X1000, I thought I could see how far I could get. Just for fun I tried this from Ubuntu MATE 2017 as I had already booted it with the latest 6.14 RC5 kernel in testing. :-)

I don't know what other methods people use to install. I usually use an installer CD modified for the purpose booted with an X1000 kernel. I tend to use a full CD over a net installer, both for having all files already, as well as net installing easily becoming obsolete.

I followed this guide for installing Debian PPC 64:
https://wiki.debian.org/PPC64

First I needed the debian-ports-archive-keyring package installed locally. But the one in MATE packages is obsolete. The solution is easy and just involves downloading latest from here and installing which works fine on the older MATE:
https://packages.debian.org/sid/debian- ... ve-keyring

So I used GParted to create anew partition. Because of the quirks I had to make sure it was aligned to cylinder otherwise there are errors. The new partition was added to an RDB disk.

I used the MATE menu to easily mount the new volume. GParted or Disks could also have been used. But I found the mount options needed to be changed or the install fails. so needed to remount:

Code: Select all

sudo mount -i -o remount,exec,dev /media/amigaone/Debian/
I then start the operation by issuing this command on the terminal:

Code: Select all

sudo debootstrap --arch=ppc64 --variant=buildd --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg sid /media/amigaone/Debian/ https://deb.debian.org/debian-ports
The command then was able to download, validate and install new packages. Until I hit this. An error. From the log:

Code: Select all

Setting up base-passwd (3.6.6) ...
Illegal instruction (core dumped)
dpkg: error processing package base-passwd (--install):
 installed base-passwd package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
 base-passwd
I wasn't sure but I suspected this could be because I am installing a 64 bit OS from a 32 bit user space. From dmesg both mktemp and apt had crashed. In any case I tried the easiest solution. Running debotstrap command again. It worked! :-D

Now the new Debian install is ready to boot. Though not mentioned in the guide I've read that debootstrap needs to run on the new install with a second stage option. Well my new Debian is ready to test, so I'll give it a boot, and I'll be back later with my part 2. -D

Re: Debian bootstrap installing

Posted: Thu Mar 06, 2025 6:29 am
by Hypex
Okay part 2 of my boot strap installing.

So I booted into it to finish but the install is faulty. Not only base-passwd crashing on install but main apt manager is crashing.

Upon some research this may be an old problem. I just tested in a chroot and found some packages want to open a dialog but no dialog is installed. It looks like apt requires a heap of packages that just aren't installed. To me this looks like the debootstrap script is completely faulty but it could just be when installing for ppoc64. According to debootstrap it appears to finish, as it gives no errors on terminal, but it hasn't even installed itself on the target! :-P

Well was a nice idea but looks like I will be installing the old fashioned way. Online installers have a fare way to go yet. Perhaps a GUI applet doing the work for us may work better in future. In the meantime installing Linux will still require lots of hacking around.

"Running Linux on AmigaONEs can require some tinkering."
xeno74
;-)

Re: Debian bootstrap installing

Posted: Thu Mar 06, 2025 8:32 am
by sailorMH
Hypex wrote: Thu Mar 06, 2025 6:29 am I don't know what other methods people use to install. I usually use an installer CD modified for the purpose booted with an X1000 kernel. I tend to use a full CD over a net installer, both for having all files already, as well as net installing easily becoming obsolete.
For Debian Sid I am using method for blondes:
- on Debian mailing list search for working cdimage snapshot( actually last is 2023-06-10, now Adrian working on 2024-10-10 ) but is has issues )
- I install it on Powermac G5 and copy image to X1000 ;-)

Sorry, I can help a little with testing, but unfortunately not with solution.

Re: Debian bootstrap installing

Posted: Fri Mar 07, 2025 1:33 pm
by Hypex
sailorMH wrote: Thu Mar 06, 2025 8:32 am For Debian Sid I am using method for blondes:
I am partly blonde. Reddish blonde. I'll follow along as best as I can. :-D

I found the CD image, thanks. I have some Mac books but never actually installed Linux on it. Booted yes. So I've never installed a standard PPC Linux on a machine it was intended for and then copied the install over to an A1. The time I installed Ubuntu 9.xx on my XE I modified the installer so I could boot the ramdisk and managed to get the installer working followed by some final tweaks for a working system. I've mostly used the same method since.

I've been thinking about about adding installer support to my boot editor so an installer image could be imported in which would be modified to boot. It would be an automated modification to an installer ramdisk, based on my past work, but automating a manual process isn't always easy to get working. I can easily add a new partition to boot from. Just need an easier way to install to it. :-)

Re: Debian bootstrap installing

Posted: Mon Mar 10, 2025 1:40 pm
by Hypex
So I had another go at it. My debootstrap package was out of date so updated to latest. Fortunately it is a simple package, not much more than a shell script, so package can also be installed directly to MATE 2017. And anything else. Though not sure how far back what older distros would be compatible.

I ended up just reformatting from fresh to avoid issues. Ran debootstrap again which ran better this time. And then entered a chroot to debootstrap the second stage.

The base system debootstrap installs is very basic. It pretty much is a base system. So basic it has no mounts. In fact the mount command wasn't even installed! So I created an fstab and installed some extra software. Some people may like it but debootstrap is no substitute for the Debian installer. Right now seeing what happens by installing a desktop. Going to try a MATE desktop. :-D

Re: Debian bootstrap installing

Posted: Tue Mar 18, 2025 6:00 pm
by sailorMH
Just for info, John Paul Adrian Glaubitz made new installation images for Debian:
Hello,

I have build updated installation images for Debian Ports.

These are available at the usual URL with the given date code [1].

I have successfully tested the installation image on sparc64, but other
architectures may or may not work. In particular, the framebuffer issue
on powerpc and ppc64 is still unresolved [2].

There are more bugs and TODO items that affect Debian Ports architectures,
I have listed them at [3].

For anyone who wants to support my work on Debian Ports, I have now enabled
Github Sponsoring on my Github page [4].

If you run into any issue or have question, please let me know.

Thanks,
Adrian

> [1] https://cdimage.debian.org/cdimage/port ... 025-03-16/
> [2] https://bugs.debian.org/cgi-bin/bugrepo ... ug=1085949
> [3] https://people.debian.org/~glaubitz/deb ... s-todo.txt
> [4] https://github.com/sponsors/glaubitz

Re: Debian bootstrap installing

Posted: Wed Mar 19, 2025 4:04 am
by Hypex
sailorMH wrote: Tue Mar 18, 2025 6:00 pm Just for info, John Paul Adrian Glaubitz made new installation images for Debian:
Thanks for info. I actually gave gave up debootstrap in the end. It was successful for the purpose of what it was doing. But the resulting bare install needed too much work. So I ended up just wiping out the base system and using a Debian installer.

Despite the beta status the installer worked fine for the most part. I didn't have any console issues I'm reading about. However, I did have to run the software selection again, because the installed mktemp and apt on the target kept crashing. Just like from debootstrap. I suspect this is a possible ppc64 issue. I had networking so that was working fine.

Just for fun I also took a broken Fienix install I had and thought I would hack it further by switching the sources list to Debian unstable. The same sources as used for the installer. Funny as it happens it's managed to download all these packages and update stuff but neither apt nor dpkg has crashed from what I can tell. Next I'll do a full update and see if it still works as well. :-)

Re: Debian bootstrap installing

Posted: Fri Apr 11, 2025 11:46 am
by sailorMH
Powerpc:
Updated Debian Ports installation images 2025-03-31
reported as "mostly worked" ;-)