RE: cdrom not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Ok, here's some more I've found on the cdrom problem:
> 
> Virtual console 3:
> * faile to mount loop: No such device
> 
> Virtual console 4:
> <4> Unable to identify CD-ROM format.
> <4> VFS: Can't find an ext2 filesystem on dev loop(7,0).
> 
> Anyone else seen this with the cdrom problems?  Any insights 
> as to what 
> this is?
> 
> Dan

This is a known problem with kickstart on the cdrom.  I thought that they
would fix it, but apparently not.  You need to either fix the loader in the
initrd.img, or put your ks.cfg file in the initrd.img.  I chose to fix the
loader, that way you can just put your ks.cfg on the CD, without having to
open the initrd.img every time your ks.cfg file changes.  Here is what I
did:

First, get and install the anaconda source rpm (anaconda-7.2-7.src.rpm),
then rebuild it:

cd /usr/src/redhat/SPECS
rpm -bb anaconda.spec

Now, get the patch (that I am attaching), and apply it to the loader, then
rebuild it:

cd ../BUILD/anaconda/loader
patch -p1 loader.c < loader.patch.7.2.fixed
make loader
strip loader

Now you have a fixed loader, which I will also attach (loader.fixed.7.2) in
case you don't want to go through the above steps.

Next, go to your Redhat 7.2 disc 1 directory, and insert the new loader into
the initrd.img:

cd /where/ever/redhat-7.2-disc1/images
mount -o loop boot.img de/  (if de/ doesn't exist, create it or choose
another directory)
zcat de/initrd.img > initrd.img
mount -o loop initrd.img es/
cp /where/ever/loader.fixed.7.2 es/sbin/loader (overwrite this file)
-OR-
cp /usr/src/redhat/BUILD/anaconda/loader/loader es/sbin/loader
umount es/
gzip -9 initrd.img

Now, you will have to delete some files from the boot.img, so that it will
fit.  I took out all of the msgs (general, expert, param, rescue) except
boot.msg.  That gave me just enough space to fit it on.  Once you delete
those files, you can copy back the new initrd.img

cp initrd.img.gz de/initrd.img
umount de/  (as long as you didn't get any errors about running out of
space).

Now you should be able to use that boot.img file, and put your ks.cfg files
on CD.  Don't forget to put an entry in syslinux.cfg for your kickstart
file.  This is what I have:

default ks
prompt 1
timeout 60
display boot.msg
F1 boot.msg
<snip>
label ks
  kernel vmlinuz
  append ks=cdrom:/ks.cfg.cdrom initrd=initrd.img lang= devfs=nomount
ramdisk_size=7168
label everything
  kernel vmlinuz
  append ks=cdrom:/ks.cfg.everything initrd=initrd.img lang= devfs=nomount
ramdisk_size=7168

Notice that I put my ks.cfg files in the top level of the cdrom.  You can
make a kickstart directory (or something like that) and put them in there.

If you have any other questions, let me know.

Forrest

Attachment: loader.patch.7.2.fixed
Description: Binary data

Attachment: loader.fixed.7.2
Description: Binary data


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux