LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2004, 07:16 AM   #1
webamoeba
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Rep: Reputation: 0
LInux Kernel-boot from external CD?


Hi,

I'm a new to most of this so don;t start talking Linux techno bable I'll talk ZEN techno bable lol.

I have craeted a bootbale Novell ZENWorks 4.0 CD from my own compiled Kernel, I have inluded a large number of extra modules, such as SCSI SATA... The CD works fine, however it fails to boot from an external CD drive (am using LiteonCDRW). I get the following messages:

hub.c New USB device 00:1d . 0-1, assigned addres 2
Freeing initrd memory: 5735k freed
VFS: mounted root (minix filesystem)
Copying files from cdrom, Please wait
Unable to mount CD-ROM
bash# Manufacturer: Liteon
Product: CDRW40 LXR -40122C
SerialNumber: 6401E6A0065E0D7F
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: Liteon Model: LXR-40243 REV: US01
Type: CD-ROM ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi3, channel 0, id 0, lun 0
sr0: scsi-1 drive
Uniform CDROM Driver REvsion: 3.12

Now beiong the bright person i am, I though, 'aha' there must be an error in cdrom.s, so I had a peek and found that sr0 was NOT one of the devices mentioned, I altered cdrom.s to suit, but it still failed, I then noticed the error message was different 'Unable to mount CD-ROM.....' in cdrom.s it is '''Unable to mount CD-ROM, Please insert a CD'. So somewhere there must be somthing invoking the wrong drives. I know that LInux supports this CD drive as I can mount it if I boot the CD from an internal cd drive i.e. mount /dev/sr0 /mnt/cdrom

Can NE1 help????

thanks

Last edited by webamoeba; 04-05-2004 at 07:18 AM.
 
Old 04-05-2004, 08:42 AM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
your bios is the only thing that can neccessarily "boot from CD" ,

What you will notice is that youve already booted a kernel, therefore will not boot again from CDrom.

Now I suppose, that if you have grub or lilo, boot from the external drive, you would need bios support for that device, and just tell lilo, or grub to boot from it.

If this doesnt make sense please explain in better detail what you are trying to do as:
hub.c New USB device 00:1d . 0-1, assigned addres 2
Freeing initrd memory: 5735k freed
VFS: mounted root (minix filesystem)
Copying files from cdrom, Please wait
Unable to mount CD-ROM
bash# Manufacturer: Liteon
Product: CDRW40 LXR -40122C
SerialNumber: 6401E6A0065E0D7F
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: Liteon Model: LXR-40243 REV: US01
Type: CD-ROM ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi3, channel 0, id 0, lun 0
sr0: scsi-1 drive
Uniform CDROM Driver REvsion: 3.12

As this only states that it cannot mount the cdrom. This could be an error in the fstab or otherwise.
I highly doubt there are fatal errors in cdrom.c as many people use and compile it frequently.

Last edited by AutOPSY; 04-05-2004 at 08:44 AM.
 
Old 04-05-2004, 09:51 AM   #3
webamoeba
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Original Poster
Rep: Reputation: 0
OK. Do you have experience of ZENWorks? Essentially this part of ZEN is used for imaging, it is normal to install a 100MB linux partition on everyworkstation. This is done using the provided ISO, the provided ISO however doesn't support booting from external CDROMS or SATA/SCSI. So I have managed to compile a 2.4.22-ac4 kernel and using provided script from Novell create a new ISO.

This ISO happily boots from an internal CDROM, but fails on an ecternal, Novells response is 'it's coming in the next version' - I don't want to wait! (nor do most ZENWorks admins).

So, I bung my CD in the drive it starts to boot, gets nearly all the way through but halts on the messages I indicated above. If I bung the CD in an internal drive it happily flies through and will mount a different CD in the external drive.

From what you have said I assume that the errors I'm seeing are a result of some of the changes the Novell scripts make when building the ISO. I also believe that ZEN uses ISOLinux to boot the Kernel.

(30min interlude whilst does some experimenting)

uuuuuuummmmmmmmmmmm. well I've learnt that the error occurs when executing the linuxrc file:
Code:
#!/bin/sh
export PATH=/bin:/sbin:/usr/bin:

# Mount / as read write filesystem
mount -o remount,rw /

# Mount proc and change the root information
mount -t proc none /proc
echo 256 > /proc/sys/kernel/real-root-dev

#copy files from seconddisk
echo "Copying files from cdrom, Please wait..."

umount /proc
for drive in scd0 hda hdb hdc hdd
do 
	mount -n -tiso9660 /dev/$drive /mnt/cdrom > /dev/null 2>&1
	if [ $? = "0" ] ; then echo "Mounting cdrom to /mnt/cdrom"; CDROM=YES; break; fi
done

#unable to mount cdrom
if [ ! $CDROM ]
then
	 echo "Unable to mount CD-ROM....."
	/bin/sh
else

#copy the settings.txt file
#check if the file is present in cdrom, else prompt for diskette with settings.txt.
	if test -f /mnt/cdrom/settings.txt; then
		/bin/crlf /mnt/cdrom/settings.txt /bin/settings.txt > /dev/null 2>&1
	elif test -f /mnt/cdrom/SETTINGS.TXT; then
		/bin/crlf /mnt/cdrom/SETTINGS.TXT /bin/settings.txt > /dev/null 2>&1
	else
		while [ 1 ]
		do
			echo 'settings.txt not found'
			echo -n 'Please insert disk containing settings.txt and press ENTER:'
			read ENTER
			mount -t vfat /dev/fd0 /mnt/floppy
			if test -f /mnt/floppy/settings.txt; then
				/bin/crlf /mnt/floppy/settings.txt /bin/settings.txt > /dev/null 2>&1
				umount /mnt/floppy
				break;
			fi
			umount /mnt/floppy
		done
	fi


export MODPATH=/lib/modules/$(uname -r)/kernel/drivers

# copy the network and other drivers
if test -d /mnt/cdrom/drivers
then	
	cp -af /mnt/cdrom/drivers/* $MODPATH > /dev/null 2>&1
	/bin/crlf $MODPATH/driver.conf /bin/driver.conf > /dev/null 2>&1
	chmod +x /bin/driver.conf > /dev/null 2>&1
	rm -fr $MODPATH/driver.conf >/dev/null 2>&1
	echo "export COPYDRIVERS=NO" > /tmp/bootmedia
else
	echo "export COPYDRIVERS=YES" > /tmp/bootmedia
fi

# copy the language files
	tar zxvf /mnt/cdrom/lang.tgz > /dev/null 2>&1
	cp /mnt/cdrom/keymaps/* /usr/lib/kbd/keymaps > /dev/null 2>&1
	cp /mnt/cdrom/consolefonts/* /usr/lib/kbd/consolefonts > /dev/null 2>&1
	cp /mnt/cdrom/consoletrans/* /usr/lib/kbd/consoletrans > /dev/null 2>&1
	/bin/crlf /mnt/floppy/lang.s /bin/lang.s > /dev/null 2>&1
	chmod +x /bin/lang.s > /dev/null 2>&1

	umount /mnt/cdrom
fi

echo "export CDBOOT=YES" >> /tmp/bootmedia
chmod +x /tmp/bootmedia
I tried changing
'for drive in scd0 hda hdb hdc hdd'
to
'for drive in sr0 sr1 scd0 hda hdb hdc hdd'
to no avail, it still stops at:
echo "Unable to mount CD-ROM....."

Now on closer inspection I discovered that all the things you would need to boot an internal CDROM are set to 'Y' not 'M', I'm guessing that I need to add some of the USB and SCSI stuff to the be built inot the Kernel???? If so do you know which items I will need?

Thanks
 
Old 04-05-2004, 11:12 AM   #4
webamoeba
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Original Poster
Rep: Reputation: 0
is there NEbody out there????? (think Pink Floyd)

well I tried a different ISOLinux file, but that didn't work. darn and bummer and blast. Am in midst of recompilinf Kernel with USB/SCSI stuff embedded in Kernel, c if that makes a different, just finished the first spindle of 25 CDs, gotta open a new one - oh no that was the last spindle . lol.

Some help some time about now would be nice¿¿¿
 
Old 04-05-2004, 01:21 PM   #5
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
Yes, at all cost a bootable CD is only bootable if the device you are using is initialized first.

This is why booting from an internal cdrom will work.
Now if this CD uses some kind of loadlinux from dos or something it might work.

I don't know but, if you can understand that your bios(computer) needs to be able to read and write from this drive before it can "boot" from it.

I know absolutely nothing about whatever whatever workstation, but I do know you need the device to be supported to boot from it, see, and next question is, are you able to use the external device at all, when youve booted into Linux?
If not, you still are that much further away from booting from an external CDrom device.
Perhaps what you should do is set your bios to boot from usb CDrom device if the ecternal CD rom device is a usb hookup.
 
Old 04-05-2004, 01:23 PM   #6
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
Also the stuff you said you changed, has nothing to do with booting from a CDrom or drive, this mounts the device and the media on it.


for drive in scd0 hda hdb hdc hdd
do
mount -n -tiso9660 /dev/$drive /mnt/cdrom > /dev/null 2>&1
if [ $? = "0" ] ; then echo "Mounting cdrom to /mnt/cdrom"; CDROM=YES; break; fi
done
 
Old 04-06-2004, 04:30 AM   #7
webamoeba
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
I know absolutely nothing about whatever whatever workstation, but I do know you need the device to be supported to boot from it, see, and next question is, are you able to use the external device at all, when youve booted into Linux?
If not, you still are that much further away from booting from an external CDrom device.
Perhaps what you should do is set your bios to boot from usb CDrom device if the ecternal CD rom device is a usb hookup.
I can quite happily use DOS boot CDs on the external drive. I can also use the Fedora install CDs, I can also mount the external CD drive from linux when booting from another site.

I'm sure that the BIOS boot stage is complete and the Kernel has booted, it's just that gumph in linuxrc where it decides to stop.

More interestingly, if I put the Linux boot CD into the internal drive and a copy of the CD in the external drive, then boot from the internal CD drive, when it comes to the linuxrc stuff it mounts the external drive and uses that quite happily! odd?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
possible to boot linux on any machine with portable external HD?!! aw76 Linux - Newbie 2 10-13-2005 12:42 PM
dual boot: linux inside, XP in external USB? rastavideo Linux - Hardware 6 06-14-2005 10:32 PM
Boot linux from external 1394... Akonbobot Linux - Laptop and Netbook 1 01-04-2005 05:31 AM
I installed linux on an external drive, and now I can't boot WizzKid Linux - Newbie 4 11-09-2004 09:37 PM
External 2.5" hard drive for linux boot? roboticservo Linux - Hardware 1 10-19-2004 01:00 AM


All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration