LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Compiling custom Kernel from install cd (https://www.linuxquestions.org/questions/slackware-installation-40/compiling-custom-kernel-from-install-cd-202957/)

DaHammer 01-03-2005 02:52 PM

Just noticed something else. I seem to remember that you need to load the USB modules in a certain order, ie usbcore, uhci, and then usb-storage for it to work right.

aikempshall 01-03-2005 02:52 PM

Thanks for the comprehensive reply. I've also spotted this with regard ISOLINUX -

"Note that ISOLINUX only uses the "plain" ISO 9660 filenames, i.e. it
does not support Rock Ridge or Joliet filenames. It can still be used
on a disk which uses Rock Ridge and/or Joliet extensions, of course.
Under Linux, you can verify the plain filenames by mounting with the
"-o norock,nojoliet" option to the mount command. Note, however, that
ISOLINUX does support "long" (level 2) ISO 9660 plain filenames, so if
compatibility with short-names-only operating systems like MS-DOS is
not an issue, you can use the "-l" or "-iso-level 2" option to mkisofs
to generate long (up to 31 characters) plain filenames."

Not sure what Rock Ridge or Joliet filenames are. I will google it.

Unfortunately work beckons so won't be able to do anymore on this until the 16th/17th as all I will have is an works IBM T30 with W2000. Although I do have knoppix and a 1GB USBKey won't be able to create any CDs as there is only one CD drive. The T30 hasn't a floppy drive.

Thanks

DaHammer 01-03-2005 03:27 PM

The joliet/rock ridge thing shouldn't be an issue.

Just remembered something else though. In order for the USB drive to work you're kernel will need SCSI and SCSI disk support. It won't be an issue if you are using the bare.i kernel because both of them are compiled into the kernel. However if you in the future build your own kernel, be sure to include them. I made a bootdisk a while back for a USB floppy drive on a laptop and narrowed it down to extactly what was needed for the drive to work. I looked back at my notes and here's what I found.
Code:

CONFIG_SCSI                ; module is scsi_mod.o
CONFIG_BLK_DEV_SD        ; module is sd_mod.o
CONFIG_USB                ; module is usbcore.o
CONFIG_USB_DEVICEFS        ; not available as a module
CONFIG_USB_UHCI_ALT        ; module is uhci.o
CONFIG_USB_STORAGE        ; module is usb-storage.o


Slackware bare.i
CONFIG_SCSI                ; compiled in
CONFIG_BLK_DEV_SD        ; compiled in
CONFIG_USB                ; module
CONFIG_USB_DEVICEFS        ; compiled in
CONFIG_USB_UHCI_ALT        ; module
CONFIG_USB_STORAGE        ; module


aikempshall 01-07-2005 12:57 PM

Sucessfully booted from a CD by

Did a mkinitrd -c -k 2.4.26 -m jbd:ext3 -f ext3 -r /dev/sda1

moved

scsi_mod.o sd_mod.o usbcore.o ehci_hcd.o uhci.o usb-storage.o

into the /boot/initrd-tree/lib/modules/2.4.26

Amended load_kernel_modules to

insmod /lib/modules/$(uname -r)/jbd.o
insmod /lib/modules/$(uname -r)/ext3.o
insmod /lib/modules/$(uname -r)/scsi_mod.o
insmod /lib/modules/$(uname -r)/sd_mod.o
insmod /lib/modules/$(uname -r)/usbcore.o
insmod /lib/modules/$(uname -r)/ehci_hcd.o
insmod /lib/modules/$(uname -r)/uhci.o
insmod /lib/modules/$(uname -r)/usb-storage.o

Amended linuxrc to include a few sleeps.

Ran mkinitrd.

Moved the contents of the boot directory including the initrd.gz to a tmp directory called isolinux ran -
mkisofs -o archos.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table isolinux

cdrecord to create the CD

Booted from the CD. Picked up the initrd.gz and booted up the /dev/sda1.

All I need to do is to get it to boot without the help of a cd. I've tried rerunning lilo but all I get is a blinking cursor in the top left had corner of the screen immediately after picking up the disk.

Tried extlinux but got no idea what should go in the extlinux.conf file.

Run out of time again, heading back to my hotel room.

DaHammer 01-09-2005 03:14 AM

To make sure I'm following you correctly. You now have a CD that boots your PC, mounts your sda1 parition and then switches it to / ?

And you also now have lilo, from your install, loading the initrd but it hangs after mounting sda1?

aikempshall 01-10-2005 07:49 AM

Yes I now have a CD that I can boot into sda1.

I've now managed to get sda1 boot itself with a bit of help from lilo. To get lilo working I went back to liloconfigure and ran than to mbr. Then added the bits and pieces like initrd=. It recognised both windows and linux partitions. So I'm up and running. Thanks for your help and advice.

After I got lilo working lost it again when I deleted/added partitions sda2 and sd3. In the end deleted all partitions with fdisk, ran testdisk-static to replace the mbr with the standard msdos mbr, then used it to determine what the partitions had been and then used testdisk-static it to recreate the mbr with the partition details. The reran liloconfigure. Back in business again.

A bit of sloppy attention by myself meant that I overwrote the mbr on hda so I couldn't get back into W2000. A good side effect from my point of view although I'm sure my employer, IBM, would have a different point of view. Again testdisk-static got me out of the hole as I used it to replace the faulty hda mbr with the standard msdos mbr so i could boot back into W2000.

Thanks again. Just need to get all the slackware bits and pieces working. Got X, kde, the mouse and reading CDs working ok.

Got security, networking dialing and writiing to CD still to do.

Thanks for the help.

mscole 08-27-2005 04:39 PM

aikempshall, I'm having a hard time making a bootable cd with your method. What is isolinux.bin?
Mike.

aikempshall 08-29-2005 02:22 AM

isolinux is part of the syslinux family. isolinux is used to create a bootable cd whereas syslinux is used to create a bootable floppy.

mscole 09-02-2005 09:04 PM

Ok, I found isolinux.bin, and got it on my boot cd, but I'm still not quite there yet. What parameters are you passing to the kernel at boot? I get as far as looking for my / directory, which is on /dev/sda5, then I get an error message telling me this is not a valid block device. How many sleeps did you add to linuxrc? for how long? where?
MIke.

DaHammer 09-02-2005 11:51 PM

isolinux.bin is a file created in the ISO image by mkisofs. This file is regenerated everytime you make an ISO with mkisofs.

The error you're getting, at what point do you get it? Does the kernel completely load? If so and the error is being generated from the linuxrc file, did you confirm /dev/sda5 exists in the initrd?

As for the sleeps, the purpose of sleeping for a few seconds is to allow the USB drivers time to initialize. Even if the USB drivers are compiled directly into the kernel you still need to allow the kernel time to find the devices. Generally, 1 sleep is all that should be required. You'd want it after loading the USB modules, if your linuxrc is loading modules, and prior to trying to access a USB device. A "sleep 10" should allow plenty of time, in fact 5 is likely enough.

aikempshall 09-03-2005 06:44 AM

See success at http://www.linuxquestions.org/questi...hreadid=357342

Regards

mscole 09-05-2005 08:59 AM

I got it to work by booting the cd I made, and entering the following parameters at the "Boot:" prompt
vmlinuz initrd=initrd.gz root=/dev/sda3 ro hdc=ide-scsi
In my case, sda3 is the / partition, and hdc is my cd writer.
Mike.

mscole 10-09-2006 09:48 PM

Has anybody tried to do this with the huge26.s kernel in 11.0? What modules did you need in your initrd-tree?
Mike.


All times are GMT -5. The time now is 07:13 AM.