View previous topic :: View next topic |
Author |
Message |
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Tue Mar 30, 2021 6:44 pm Post subject: Installing from busybox - fdisk fails, mount iso9660/nfs too |
|
|
Hello everyone,
I'm interested in alternative architectures for a long time but, since I'm not really a programmer, I was always around my comfort zone.
I decided to learn programming and I think that the best way is getting into the mud.
However, I am a very experienced sysadmin.
So I successfully installed Gentoo to a Raspberry Pi and now I'm struggling with a HP C8000 (PA-RISC). My machine doesn't have a DVD drive.
But no big deal, I downloaded the netboot-hppa64.lif, prepared a bootp server and off I went. However:
1. When I try to run fdisk, I get the following:
Code: | fdisk: error while loading shared libraries: libfdisk.so.1: cannot open shared object file: No such file or directory |
2. If I try to mount the minimum installation disk, I get:
Code: | /mnt/gentoo # mount -t iso9660 /tmp/iso/install-hppa-minimal-20191101T093009Z.iso /mnt/isomount
mount: mounting /dev/loop0 on /mnt/isomount failed: No such device |
3. NFS mounting also fails:
Code: | /mnt/gentoo # mount -t nfs 192.168.60.100:/mnt/sun-nas/Public /mnt/nfs
[ 4371.653600] svc: failed to register lockdv1 RPC service (errno 239).
mount: mounting 192.168.60.100:/mnt/sun-nas/Public on /mnt/nfs failed: Connection refused |
Everything is being done via serial console, because I crash during the usual boot.
Any tips on how to proceed from busybox?
I look forward to helping everyone in the future and I appreciate your help in advance.
Code tags added by NeddySeagoon |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Tue Mar 30, 2021 7:21 pm Post subject: |
|
|
Shiunbird,
Welcome to Gentoo.
I'm not familiar with PA-RISC at all but I may be able to help with the errors.
Busybox has fdisk.
Its not clear from your post if you are trying to run real fdisk or busybox fdisk.
Try
Its also possible that you don't have real fdisk just a symlink pointing to busxbox.
Code: | mount: mounting /dev/loop0 on /mnt/isomount failed: No such device |
Does allow the command to work?
For the nfs mount, try adding the nolock,ro options. With no locking you need to be very careful with rw. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Tue Mar 30, 2021 8:23 pm Post subject: |
|
|
Thank you.
busybox fdisk fails with the same error.
I checked /bin. All the utilities are linked to busybox. fdisk calls busybox fdisk automatically and fails the same way.
modprobe loop says that loop doesn't exist.
I will try nolock,ro tomorrow and report back. Many thanks! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Tue Mar 30, 2021 9:54 pm Post subject: |
|
|
Shiunbird,
There is no requirement to use the Gentoo minimal CD to install Gentoo. Its just a toolkit.
Any toolkit the runs can be used an none of its code goes into your install, That comes from the stage3.
You could even install Debian then use Debian to install Gentoo, eventually removing Debian.
The C8000 uses wide SCSI. Can you do the install anywhere else then move the drive over?
Given all the bits, or al least, enough to boot with, its possible to put all the bits in the right places and to the configuration without ever needing to chroot into the system.
How deep into the mud do you want to get?
Its even possible to use QEMU to chroot into your hppa install from $RANDOM_ARCH. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Wed Mar 31, 2021 6:43 am Post subject: |
|
|
Hi Neddy,
Unfortunately, the C8000 is the first machine with SCSI that I touch in 10 years.
But knowing that everything comes from stage3 helps.
The LIF that I'm booting from contains busybox. I've had a look around and it seems that it's a very barebones implementation, missing a lot of libraries and even the mount options are super limited.
I am wondering if I could use mkboot to create a new LIF straight from the minimal ISO, so I could load a more complete implementation (one under which fdisk would load) =)
Here are the contents of lib:
Code: |
/lib # ls
keymaps libmount.so.1.1.0 librt.so.1
ld.so.1 libncurses.so.6 libss.so.2
libblkid.so.1 libncurses.so.6.1 libss.so.2.0
libblkid.so.1.1.0 libncursesw.so.6 libutil-2.29.so
libc.so.6 libncursesw.so.6.1 libutil.so.1
libcom_err.so.2 libnsl-2.29.so libuuid.so.1
libcom_err.so.2.1 libnsl.so.1 libuuid.so.1.3.0
libcrypt-2.29.so libnss_compat-2.29.so libxfs.so.0
libcrypt.so.1 libnss_compat.so.2 libxfs.so.0.0.0
libdl-2.29.so libnss_dns-2.29.so libxlog.so.0
libdl.so.2 libnss_dns.so.2 libxlog.so.0.0.0
libe2p.so.2 libpthread-2.29.so libz.so.1
libe2p.so.2.3 libpthread.so.0 libz.so.1.2.11
libext2fs.so.2 libresolv-2.29.so modules
libext2fs.so.2.4 libresolv.so.2
libmount.so.1 librt-2.29.so
|
And modules
Code: | /lib/modules/4.19.66-gentoo/kernel/fs # ls
jfs nfs nfsd reiserfs
lockd nfs_common nls xfs
/lib/modules/4.19.66-gentoo/kernel/fs # cd ..
/lib/modules/4.19.66-gentoo/kernel # cd drivers/
/lib/modules/4.19.66-gentoo/kernel/drivers # ls
md net
/lib/modules/4.19.66-gentoo/kernel/drivers # cd net
/lib/modules/4.19.66-gentoo/kernel/drivers/net # ls
netconsole.ko
/lib/modules/4.19.66-gentoo/kernel/drivers/net # cd ..
/lib/modules/4.19.66-gentoo/kernel/drivers # cd md
/lib/modules/4.19.66-gentoo/kernel/drivers/md # ls
linear.ko md-mod.ko raid0.ko raid1.ko raid10.ko raid456.ko
|
I'm willing to get quite deeply into the mood because this is a learning exercise.
I've been for years a quite decent sysadmin but now with the cloud everything is super detached from reality. I've found myself more than once having to help developers dig very deep into things they haven't touched in a long time, just because it gets so hard to find out what's going on once you are 1000km away from it.
So I'm trying to understand the whole process of how a system comes to be. Non-x86 is a deliberate choice, so I'm working with hppa, arm and ppc.
Any tips on how I could turn the minimal system from ISO to a LIF that I could push to my tftp server? I'm wondering how the LIF that is posted in the Gentoo main page is built.
I found this https://www.netbsd.org/docs/network/netboot/intro.hppa.html
If this starts frustrating me, I will try to arrange a CD drive, but I don't see why netboot wouldn't work since I get to it. =)
I just so far lack the skill to add the missing pieces. Or a way to then use the resources from stage3 (perhaps use fdisk from there) to be able to install from busybox. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Wed Mar 31, 2021 11:20 am Post subject: |
|
|
Shiunbird,
The firmware downloads the LIF file and executes it somehow.
Try the Debian LIF file. You only need a tools and a root shell.
The Debian LIF may want to run a Debian installer, so you will need to break out of that.
It may be worth a bug search at bugs.gentoo.org to see if there is a known bug with solution.
If not open one. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Thu Apr 01, 2021 6:53 pm Post subject: |
|
|
Reporting back on my progress:
1. The netboot image from Gentoo has a few problems:
fdisk is broken.
no mkfs.
Console on ttyS0 gives tons of garbage output after the kernel disables B0 console (the baseband serial output).
ttyS1 didn't work.
ttyB0 works.
Console on VGA kernel dumps.
2. The netbook image from Debian has also a few problems:
wget or curl don't accept HTTPS
No mkfs, fdisk or parted, only the installer partitioner, that I didn't manage to launch outside of the installer (it loads and closes)
Console on ttyS0 goes off after the kernel switches from ttyB0 to S0.
Console on ttyS1 works. I just need to switch port after boot.
I ran the installer to get a file system, and now I am booting from Gentoo netboot to proceed with stage 3. Fingers crossed!
I wonder how this is going to go with PALO.
I tried to use PALO to include the whole installation CD in my netboot image.
Any ideas on how to do it? All distributions seem to load a very minimal boot and then expect a CD with the rest. How can I incorporate everything in the main image I get from tftp. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Thu Apr 01, 2021 7:40 pm Post subject: |
|
|
Shiunbird,
Do you know if there are any size limits on the boot code downloaded via tftp?
Imposed by the C8000, not the tftp server.
You have a tftp server.
wget should fetch from there but sometimes http is the only way. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Thu Apr 01, 2021 9:05 pm Post subject: |
|
|
Hi Neddy,
2GB.
It should be enough for stage3, but I don't know how to build it all together. I was hoping that booting from the CD would help me, but I guess it won't fix what comes next.
I managed to go the Debian route, as you mentioned, and chroot into stage3.
Now I am stuck in dependency hell. =(
I was hoping that everything in the stage3 would be compatible. Can I build from whatever is in stage3 that is binary pre-built?
I'm a complete amateur when it comes to installing from sources.
I managed to get it working in VirtualBox, but there everything just resolves dependencies, links and builds fine =). |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Thu Apr 01, 2021 10:54 pm Post subject: |
|
|
Shiunbird,
I saw your other post, I feel your pain.
Doing a one year update in one step is hard. Smaller steps are possible. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Fri Apr 02, 2021 6:28 am Post subject: |
|
|
To accept https test:
wget --no-check-certificate ..... |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Fri Apr 02, 2021 7:57 am Post subject: |
|
|
Irre wrote: | To accept https test:
wget --no-check-certificate ..... |
I tried.
Not implemented. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Fri Apr 02, 2021 10:54 am Post subject: |
|
|
This is being a very interesting saga.
After 3 levels of chrooting from the Debian installer and two reboots, I managed to make the file systems cleanly according to the HPPA Handbook.
Still trying to get through with the initial run of emerge.
Thanks for all the help!
I will keep everyone posted and inform the resolution, if I ever get one =) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Fri Apr 02, 2021 12:40 pm Post subject: |
|
|
Shiunbird,
failure is not an option. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Shiunbird n00b
Joined: 30 Mar 2021 Posts: 28
|
Posted: Fri Apr 02, 2021 12:49 pm Post subject: |
|
|
It's working!
Code: | emerge --ask --update --deep --newuse @world | is running already for 1 hour.
I'm now emerging 37 of 163 app-arch/zstd-1.4.9.
It's taking a bit to long at CC obj/.../static/xxhash.o, I'm hoping it didn't crash. |
|
Back to top |
|
|
mattst88 Developer
Joined: 28 Oct 2004 Posts: 422
|
Posted: Mon Sep 13, 2021 5:22 am Post subject: |
|
|
FWIW, I've been working on restoring the HPPA stages, installcd, and netboot images lately. See the log of https://gitweb.gentoo.org/proj/releng.git/
After working through about 10 different problems, I think I'm down to one last issue: genkernel switched from mdev to udev, but no one updated genkernel's netboot linuxrc. Once that's resolved, I expect things to work again.
I'm also going to move the HPPA builds from our extremely slow single-CPU C3600 to a QEMU-emulated build environment on a beefy amd64 system. _________________ My Wiki page |
|
Back to top |
|
|
jonys n00b
Joined: 13 Dec 2016 Posts: 9
|
Posted: Sun Jan 08, 2023 12:56 pm Post subject: |
|
|
Shiunbird wrote: | 2. If I try to mount the minimum installation disk, I get:
Code: | /mnt/gentoo # mount -t iso9660 /tmp/iso/install-hppa-minimal-20191101T093009Z.iso /mnt/isomount
mount: mounting /dev/loop0 on /mnt/isomount failed: No such device |
|
Shiunbird,
even though you've long since worked around the issue, I've hit the same problem with a newer (2022-12-11) boot image and eventually managed to fix it. (EDIT: On rereading, it seems likely your problem has similar symptoms, but different cause and solution. Apologies for hijacking the thread; I'll keep my post here since it has already been reacted to.) I'm writing the steps here for future reference. I'm using the minimal installation CD written to a CF card connected to the internal IDE bus. The boot progresses until the root device is needed and then it stops with the following error:
Code: | !! Media not found
!! Could not find CD to boot, something else needed!
>> Determining root device (trying ) ......
!! Block device is not a valid root device ...
!! Could not find the root block device in .
!! Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip ...
root block device() :: /dev/sdb
>> Determining root device (trying /dev/sdb) ...
>> Root device detected as /dev/sdb!
>> Mounting /dev/sdb as root ...
>> Using mount -t auto -o ro /dev/sdb /newroot
mount: mounting /dev/sdb on /newroot failed: Invalid argument
!! Could not mount specified ROOT!
!! Block device /dev/sdb is not a valid root device ...
!! Could not find the root block device in /dev/sdb.
!! Please specify another value or:
!! - press Enter for the same
!! - type "shell" for a shell
!! - type "q" to skip ...
root block device(/dev/sdb) :: |
As you can see, manually specifying the device as /dev/sdb doesn't help. Using the shell to mount the disk produces error `mount: mounting /dev/sdb on /mnt/ failed: Invalid argument`, mounting it with `-t iso9660` fails with `mount: mounting /dev/sdb on /mnt/ failed: No such device`.
The issue seems to be that the ISO9660 filesystem is not in /proc/filesystems, because the initramfs contains no kernel modules for the 64bit kernel, only for the 32bit one. There are two initramfs on the CD, 32bit and 64bit, but even when manually specifying the path to the 64bit initramfs in the PALO bootloader, the 32b initramfs is loaded.
The reason for this is that the bootloader doesn't actually read the ISO9660 filesystem, it uses more low level information about the CD stored in the (I guess?) boot block. See `man xorriso` and search for hppa for more details. The boot block can store two kernels, 32b and 64b one, but just one initramfs. PALO can't read ISO9660 at all, so it ignores the paths you give it, just parses out the suffix (32 or 64), selects the kernel based on that and uses the only initramfs it has available.
A fix is slightly more involved and requires regenerating the installation ISO, merging the two initramfs into an universal 32+64b one. What I did is the following:
Code: | # Perform the following steps as root, otherwise file ownership information is lost.
# Extract the ISO to a directory.
xorriso -osirrox on -indev install-hppa-minimal-20221211T143149Z.iso -extract / extracted
cd extracted/boot
# Extract the 32bit initramfs.
mkdir extracted-32
xz -dkc hppa32.igz | cpio -imD extracted-32/
# Add the modules from the 64bit initramfs to it.
xz -dkc hppa64.igz | cpio -imD extracted-32/ 'lib/modules/*'
# Create a new initramfs.
cd extracted-32/
find . -print0 | cpio --null --create --format=newc | xz -z9evvC none > ../hppa32.igz
cd ..
# Delete the temporary files as well as the unused 64bit initramfs.
rm -rf extracted-32 hppa64.igz
cd ../..
# Create a new ISO with the updated initramfs.
xorriso -outdev install-edited.iso -volid 'Gentoo hppa 20221211T143149Z' -map extracted / -boot_image any hppa_cmdline='0/hppa initrd=hppa32.igz root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot' -boot_image any hppa_bootloader=/boot/iplboot -boot_image any hppa_kernel_32=/boot/hppa32 -boot_image any hppa_kernel_64=/boot/hppa64 -boot_image any hppa_ramdisk=/boot/hppa32.igz |
After writing the ISO to the CF card, it boots correctly.
Last edited by jonys on Fri Jan 13, 2023 12:24 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Sun Jan 08, 2023 1:03 pm Post subject: |
|
|
jonys,
Please post a bug at bugs.gentoo.org. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
jonys n00b
Joined: 13 Dec 2016 Posts: 9
|
Posted: Tue Jan 10, 2023 9:15 am Post subject: |
|
|
I will. We already talked about the issue with sam, matoro and mattst88 on the #gentoo-hppa IRC (no idea if one of them is you, sorry ) and a workaround was pushed by mattst88 – build the iso9660 driver into the kernel, so that the boot process works without requiring the initramfs. A proper solution would be to only generate a single initramfs with both module sets. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54575 Location: 56N 3W
|
Posted: Tue Jan 10, 2023 10:39 am Post subject: |
|
|
jonys,
I'm NeddySeagoon on IRC too. It keeps life simple :)
I don't have any HPPA equipment.
My SPARC U10 died in 2012, so I replaced it with an original Raspberry Pi B, as it was lower cost than the parts for the U10.
I've been playing with arm and arm64 since. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
jonys n00b
Joined: 13 Dec 2016 Posts: 9
|
Posted: Fri Jan 13, 2023 12:27 pm Post subject: |
|
|
I see. ARM is also nice, it used to have the wonderful soft-float vs. hard-float issues. I'm sorry for your SPARC loss – if my PPC server died on me, I'd be very sad, even though it is now way past its useful lifetime.
I filled the bug here. |
|
Back to top |
|
|
|