2019-03-03 03:38:02

A Cuntoo Adventure Part Two
Let's continue from the earlier cuntoo adventure.

So there I was, attempting to build a Cuntoo from my Gentoo installation on my system: Lenovo M-7033; Intel i5-2400 @ 3.10Ghz CPU; 8 Gb RAM; 500Gb SATA SSD.

To recap a bit from last time, the system's working Gentoo installation was on a 500 Gb WD SATA SSD, plugged into SATA channel 1 on the motherboard. To create a cuntoo, I simply powered down the box. Unplugged the mains, disconnected the CDROM drive from the power supply and it's SATA cable from SATA channel 2. I then proceeded to connect a 250 Gb WD SATA SSD to the power supply and then SATA channel 2. This way I could boot up gentoo, build/configure cuntoo, and target /dev/sdb (250 Gb WD SSD) as the block-device in-which to inflate cuntoo upon. These are the same initial steps that I had taken all during part one of this adventure.

I stopped into the forum for some help, however, I didn't go about all of this in the correct manner, so I caused more harm than good. But asciilifeform did mention to me that I needed to remove all modules from the kernel config. I then proceeded to build Cuntoo without any modules, but actually didn't return to check or work on it for about five days. Once I did manage to get more time to work on it, I did the following steps powered down Gentoo, unplugged mains, unplugged the Gentoo 500 Gb SSD from the power supply, unplugged its SATA cable from channel 1, unplugged the Cuntoo 250 Gb SSD from the power supply, unplugged its SATA cable from channel 2, then plugged the Cuntoo 250 Gb SSD into the power supply and the SATA cable into channel 1. Additionally, I plugged the CDROM drive's power supply cable and the SATA cable back into channel 2. With that, everything was in place on the inside of the box for a test-boot. On the outside of the box, I ensured that my Null Modem cable was plugged in to the serial port, and to another machine where I could capture the output in case of Kernel Panic.

I set:

stty -F /dev/sttys0 115200 raw -echo -echoe -echok

on my secondary box, then immediately ran:

dd if=/dev/ttyS0 of=kern.nomods

Now that I was collecting output data from the serial line, it was time to power on the Cuntoo box and see if it helped anything by having no kernel modules at all, everything compiled in directly. After the box started up, the Cuntoo Lilo screen came up as expected, and then after 5 seconds, proceeded to boot. What was interesting was, I had the same output message on the screen as the previous times:

Loading Cuntoo.......................................
BIOS data check successful
early console in extract_kernel
input_data: 0x0000000001dd23b4
input_len: 0x0000000004f8f38
output: 0x0000000001000000
output_len: 0x00000000012b9908
kernel_total_size: 0x000000000106c000

Decompressing Linux... Parsing ELF... done.
Booting the kernel.

The main difference here was that instead of 39 dots after Cuntoo, there were hundreds (maybe?). My guess at that being that the kernel, with no modules, is just larger which outputs more dots during extraction time. Fine. Then after that message above posted, the screen flickered (which didn't happen on any previous attempt), and then changed fonts to a much smaller point value and displayed 4 penguins at the top of the screen (also something not seen in any previous attempt). I was somewhat convinced that this may just fully boot up! But after about 5 or 6 minutes (I wanted to give it time since it's a fairly large kernel), I finally powered it down. Snake-eyes. And with that I had run out of time to work on for another four or five days.

Side quest: We've gotten a whopping 51.4 inches of snow in February. It's been keeping me hopping from one foot to the next to keep it all cleared. I've also used 250 pounds of salt in one single month! I bought three hundred pounds, which I figured would easily last me a year, and maybe two. One month later, I'm pretty convinced I'll go through the remaining 50 pounds before it's all over.

Back to our adventure... I'd been rightly flogged for being an asshat and idiotically tilting at windmills. So I decided to slow down, and take a measured and calculated approach to figuring out what the problem might be. The first step here being to look at the kernel panic output from the 'no kernel modules' build that I had made a number of days prior. At first glance, I didn't see anything really too different in the actual reported error, with the subtle difference this time that the VFS was not able to mount root fs on unknown-block(8,3). Which in previous attempts it had said unknown-block(0,0). I walked away for about half an hour to think on it, and decided to read through the entire huge readout from the kernel panic. This one was much larger output from the first part of the adventure as this time, everything was compiled in directly.

Going through the entire massive output, I happened across the following:

[ 18.289235] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 18.289271] sd 1:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[ 18.289480] sd 1:0:0:0: [sdb] Write Protect is off
[ 18.289526] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 18.320978] Initializing XFRM netlink socket
[ 18.321079] sdb: sdb1 sdb2 sdb3
[ 18.321383] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 18.322469] scsi 2:0:0:0: CD-ROM HL-DT-ST DVD-RAM GH70N NYA2 PQ: 0 ANSI: 5

Now this really struck me, because this part was never present before in the previous kernel panics that I had read through during the adventure. In this case, it seems that it found my disk! But it was strange to me that I found it labeled 'sdb', where I expected it to be 'sda'.

Once again, I put the Gentoo Live CD into the CDROM drive, booted into the live disk, and made a cuntoo chroot. Inside there, I simply changed the /etc/fstab to the following:

/dev/sdb1 /boot ext2 noatime 1 2
/dev/sdb2 none  swap sw      0 0
/dev/sdb3 /       ext4 noatime 0 1

And then I only changed 1 line in lilo.conf, from:

append="root=/dev/sda3 console=ttyS0,115200n8 net.ifnames=0"


append="root=/dev/sdb3 console=ttyS0,115200n8 net.ifnames=0"

Then I ran the following command to update the lilo:


Once that was finished, I exited the chroot, and did a shutdown on the box. I removed the Live CD, and then I booted my first Cuntoo.

That's all there really is to tell for this part of the adventure. There is more yak shaving to be done, of course. I'll post more when I have updates.