Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing from busybox - fdisk fails, mount iso9660/nfs too
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Tue Mar 30, 2021 6:44 pm    Post subject: Installing from busybox - fdisk fails, mount iso9660/nfs too Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Tue Mar 30, 2021 7:21 pm    Post subject: Reply with quote

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
Code:
busybox fdisk

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
Code:
modprobe loop
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
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Tue Mar 30, 2021 8:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Tue Mar 30, 2021 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Wed Mar 31, 2021 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Wed Mar 31, 2021 11:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Thu Apr 01, 2021 6:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Thu Apr 01, 2021 7:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Thu Apr 01, 2021 9:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Thu Apr 01, 2021 10:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 400
Location: Stockholm

PostPosted: Fri Apr 02, 2021 6:28 am    Post subject: Reply with quote

To accept https test:

wget --no-check-certificate .....
Back to top
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Fri Apr 02, 2021 7:57 am    Post subject: Reply with quote

Irre wrote:
To accept https test:

wget --no-check-certificate .....


I tried.
Not implemented.
Back to top
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Fri Apr 02, 2021 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47967
Location: 56N 3W

PostPosted: Fri Apr 02, 2021 12:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Shiunbird
n00b
n00b


Joined: 30 Mar 2021
Posts: 28

PostPosted: Fri Apr 02, 2021 12:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum