Installer doesn't list all partitions

Set up a test ‘disk’.

All partitions are shown here because part_show(), line 1089 calls lsblk and awk makes it pretty for printing.



Notice how the name is truncated after partition 9.
I believe the error has happened at this point.
Where the partition count has gone above a single digit.

Correction: this is only a display error. PART_COUNT has not yet been effected.


Swap partition, p17 not shown.


edit: after more reading
the truncated error is line 1256; 1258

	if [[ $dev = /dev/nvme* ]]; then
		model=$(lsblk -lno MODEL "${dev%p[1-9]}" | awk '{gsub(/ |\t/, "_"); print}')

At this point all partitions are counted, just not displayed in the full format. That should also happen for the following screens. But it doesn’t; somewhere PART_COUNT get set below 10 before Swap Setup is called.

2 Likes

Good finding. Wait for @natemaia to verify.

1 Like

Yeah --I tried changing 9 to 10 on the fly. Maybe I did it wrong but no joy so far. Really appreciate all the time folks are spending taking a look at this

2 Likes

Respectfully, no. :slight_smile: This is so much fun; I’m gunna keep digging. See I’m a hardware guy. I did a little 6501/6510 assembler programming back 40+ years ago; late '70’s. and nothing since. Never worked with BASH. So this is really interesting.

2 Likes

I tried 20. it stopped listing the partition names at 2. So it looks like the variable can only accept a single digit integer, or what ever the lingo is.

1 Like

Change the 1st line from

#!/bin/bash

to

#!/bin/bash -x

to debug.

2 Likes

Well, I’ve beat my head against the wall for a few hours now. Have to come back to it after I do my chores :slight_smile:
thanks again, everyone

Which installer did you change, /usr/local/bin/installer? If yes, did you remember to skip “update installer” step?

I do not have the environment to play with it. You guys can change the installer,

Change the 1st line from

#!/bin/bash

to

#!/bin/bash -x

to debug.

Start script before you launch the installer.

#script /tmp/al_installer.log

then launch the installer.

#installer

Remember to skip “update the installer” when offered. Go ahead to follow the steps until you reach the problem.

#exit

/tmp/al_installer.log is the debug output file. Inspect the file. It may give you some clues.

Thanks chroot. I ran the script in debug mode from inside my current install and captured the output to a text file. Studying it and trying to figure it out.

I downloaded it straight from the bitbucket page. It shows the same behavior as running it through the iso

installer -D creates a debug log (named debuglog) in /tmp which has been helpful.

I edited part_countdec() from:

to:

and the output is:

part_count dropped as expected
But $parts should be /dev/nvme, not /dev/sda1
$dev did not print out, ???

1 Like

Next is to format/mount the boot partition.

part_count continues to decrement.

I hope we hear from Mr. Maia soon. :slight_smile:

Can either of you run the debug installer and upload the log file? I will take a look at it when I have time.

I have a file – how do I upload it?

https://drive.google.com/drive/folders/10LZlVRIPR1MAU_wl8yykPOZ3_e-kbMXw?usp=sharing

Thanks for the logs. I was able to trace it down. There’s a bug at line 1377.

PARTS="$(sed "/${pt//\//\\/}/d" <<< "$PARTS")"

Try to change it to,

PARTS="$(sed "/${pt//\//\\/}\ /d" <<< "$PARTS")"

In your case, partition “/dev/nvme0n1p1” was selected as boot partition.

Command

sed '/\/dev\/nvme0n1p1/d'

deletes “/dev/nvme0n1p1x” in the partition list.

Please test it and let me know if it works.

1 Like

No change, same as before. Only p3-p9 listed at Swap Setup.

if [[ $dev = /dev/nvme* ]]; then
		model=$(lsblk -lno MODEL "${dev%p[1-9]}" | awk '{gsub(/ |\t/, "_"); print}')

still won’t properly list partitions. line 1256; 1258

It’s not swap. It’s in mount_extra. (read original post).

mount_swap doesn’t display all partitions.