You are not logged in.

#1 2005-12-29 20:29:52

sodface
Member
Registered: 2005-12-26
Posts: 38

Remastering Install CD with Custom Kernel

I've read this wiki article several times and I don't quite get it.

Let me explain a little - I've been running Arch on my home server for well over a year and I really like it.  I did a system upgrade about a month ago, followed the tips for the 2.6 kernel upgrade, and didn't really have any problems.  I decided to reinstall from scratch though because I'm still learning Linux and I wanted to go through the process again and also because I felt that I hadn't done things quite right the first time around, as far as directory structure and custom packages etc. 

It's nice to start fresh sometimes.

My little server, such as it is, is headless like most servers and sits up high on my filing cabinet.  I access it via the network using puTTy and WinSCP.  (yeah, I'm still running Windows on my main desktop).  Doing admin duties over the network is great during normal operation, but for installing or when something has gone awry during a reboot, you can't use it and have to hook up a monitor to see what's going on. 

Unless you use the serial console.

I remastered the 0.7.1pre installation cd to enable the isolinux serial output and also passed the console=ttyS0 parameter to the kernel.  The kernel on 0.7.1pre install cd didn't have the serial console option set when it was compiled so I lost the serial output right after the isolinux boot screen/menu.

Can anyone explain to me a little better how to go about replacing the kernel on the install cd with a custom one?  I've tried a couple of times and failed both times.  I don't have another linux box right now so I booted my Win machine with the Archie live CD and Pacman'd the latest kernel from the repo.  (which has the right option set for serial console).  I then copied the resulting kernel file and initrd.img from the /boot directory and replaced the original ones from the installer cd, and then created and burned the new iso. 

Most of the boot went pretty well, serial output was working good and then right at the end of the boot process I got an error about the pivot_root function failing.   I was missing most of the directories I should have had, basically I figured the install environment wasn't setup properly.

I thought the problem was with the initrd.img and the linuxrc script not being tailored for an install cd.  I copied the initrd.img from the orignial install iso and tried to use that with the new kernel.  That was pretty ugly, many kernel modules not loading and other errors.  Again, unusable.

So I'm really botching my attempts at remastering.  At a minimum I'd like to just replace the kernel on the 0.7.1pre cd and change nothing else.  Alternatively, I'd like to build a whole new cd with the packages from the 0.8 directory from the Arch ftp site.  Get the most up-to-date stuff on the cd in other words.

So as for the wiki article, I'm still confused on most points.  When you recompile the kernel don't you have to use a new initrd.img?  Or does it depend on what config changes are made between kernels?  If you recompile something as a module that wasn't before, don't you need to include that new module on the cd too?  Where does it go, into /addons?

I'm pretty weak in most areas linux-wise, kernel compilation in particular, and the way in which things interact during the boot process.  I've been doing a lot of reading and losing quite a bit of sleep but I've been having fun.  I'm also kind of to the point where I'm ready for someone to throw me a fricking bone if at all possible.

And, yeah, I know I could just hook up a monitor and forget the whole serial console thing, but, it's a point of pride thing now.

I was also about 3/4ths of the way through a gentoo install over the serial port when I decided to come back here and post this.  I don't want to leave Arch.

Offline

#2 2005-12-30 04:58:09

sodface
Member
Registered: 2005-12-26
Posts: 38

Re: Remastering Install CD with Custom Kernel

Someone searching may want to see this thread for a script that updates the base .iso.

I haven't tried it since I don't have an Arch box running.

Offline

#3 2005-12-30 05:20:10

sodface
Member
Registered: 2005-12-26
Posts: 38

Re: Remastering Install CD with Custom Kernel

I redid the 0.7.1 .iso again and only replaced the kernel with the most recent kernel26 from the repo.  everything else was the same.  It booted ok until right at the end:

borked install cd wrote:

init started:  BusyBox v1.01 (2005.11.04-01:16+0000) multi-call binary
Loading base add-on...
Loading /addons/mods-base.tar.bz2...
Done.
Attempting to load all add-ons from CD...
usage: loaddisk <source_media> [source_media]

eg: loaddisk /dev/fd0
eg: loaddisk /dev/hdc
eg: loaddisk /addons/modules.tar.bz2

Attempting to load USB HID support...
modprobe: could not parse modules.dep

modprobe: could not parse modules.dep

modprobe: could not parse modules.dep

modprobe: could not parse modules.dep

So I figure this means that I'm either missing modules in the addon directory or that they don't match the new kernel version.  How do the devs make the .iso when they release it?  Surely they must have some handy scripts that zip up all the required modules and utils and stick them in /addons?

As a side note, the wiki article I referenced in the first post mentions mounting and editing linuxrc.  linuxrc is a symbolic link to busybox.  Opening that in nano isn't pretty.  I take it that busybox hasn't always been used on the installer and that linuxrc actually used to be a script?  Or am I missing something?

I'll keep muddling along and alienating my family and post back if I find out anything, sodface.

Offline

#4 2005-12-31 08:09:10

sodface
Member
Registered: 2005-12-26
Posts: 38

Re: Remastering Install CD with Custom Kernel

I gave up and hooked up a monitor.

Thanks for the help.

Offline

#5 2006-01-01 17:28:16

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Remastering Install CD with Custom Kernel

the wiki article doesn't say anything about editing linuxrc.

If you did the remastering under windows, check the note at the bottom of the article.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2006-01-04 04:49:38

sodface
Member
Registered: 2005-12-26
Posts: 38

Re: Remastering Install CD with Custom Kernel

My mistake.  It was this wiki that mentioned it, and I'm sure it would work in that case.

Feel free to explore since this isn't you initrd image yet. linuxrc is the initscript, in my case this is what I had to edit to create the proper device nodes. Your reasons for doing this may be diferent so I won't go into much detail here.

I did read that note. remastering on Windows wasn't the problem - I was using BCD which itself is just a front for mkisofs.  The cd's I made booted fine, just never came all the way up before the kernel collapsed.

Offline

Board footer

Powered by FluxBB