Visit Our UNIX and Linux User Community


How to determince CD is bootable or not


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to determince CD is bootable or not
# 1  
Old 03-07-2009
How to determine CD is bootable or not

Hi,

How can i determine the /dev/scd0 is bootable or not from command-line with single-line command according to ElTorito specification or something else?

Regards,

Last edited by oduth; 03-07-2009 at 08:36 AM..
# 2  
Old 03-07-2009
The isoinfo command can be used to extract that kind of data from iso images, if you don't have it, it comes with the cdrecord suite.
# 3  
Old 03-13-2009
You can also use dd to determine if the CD/DVD is bootable i.e.
Code:
#!/bin/bash

DEVICE="/dev/sr0"
VERBOSE=1

bchex=`dd if=${DEVICE} skip=34887 bs=1 count=2 conv=swab 2>/dev/null | xxd | cut -d" " -f2`

bcdec=`printf "%d" 0x${bchex}`

bootable=`dd if=${DEVICE}  bs=1 skip=$(( bcdec * 2048 + 32))  count=1  2>/dev/null | xxd | cut -d" " -f2`

if [[ $bootable = 88 ]]; then
   [ $VERBOSE ] && printf "Bootable CDROM\n"
   exit 0
else
   [ $VERBOSE ] && printf "Not a bootable CDROM\n"
   exit 1
fi


Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Hardware

Bootable thumbdrive

Hi all! I trying to modify my bootable thumbdrive to be seen in window OS when i plug in. I did a FAT32 partition for it but it seem like! "windows only recognizes the first primary partition on a removable device" My 1st partition is my Ubuntu OS partition ext4, is there a way to go about... (4 Replies)
Discussion started by: GQiang
4 Replies

2. SCO

Recovering 5.0.7 from Bootable CD

I've been working with SCO Unix for several years now but have never had to restore a system from a bare drive. I have a bootable CD that contains what appears to be the correct files necessary to recover the boot and root filesystems. I've got the BIOS setup such that the CD is the first... (12 Replies)
Discussion started by: teamhog
12 Replies

3. Filesystems, Disks and Memory

Make non-bootable scsi drive, bootable

In our HP/Unix system, our master scsi drive was bootable and our mirrored drive was non-bootable. Are any of these alternatives possible: 1) Make the non-bootable scsi drive bootable? How? 2) Create a bootable scsi drive, then copy the mirrored data to the newly created scsi drive? I seek... (1 Reply)
Discussion started by: bfisk
1 Replies

4. UNIX for Dummies Questions & Answers

How to have bootable backup?

In my present dual boot (Fedora Core 4 & WinXP2003 Server) desktop computer, I have redundant 100GB disk drives. Every so often I boot fedora core 4 and telinit 1 cp /dev/sda /dev/sdb and then I reverse the connections to the drives so I boot from the newly created copy. I just ordered... (2 Replies)
Discussion started by: siegfried
2 Replies

5. UNIX for Dummies Questions & Answers

Bootable CD

Hello all, I was wondering if anyone had made a bootable Linux CD with additional directory inside it. I'm trying to make a bootable CD with additional rpm to install the correct video card in a seaperate directory. I'm able to make a kickstart bootable CD but am unable to read into the new... (2 Replies)
Discussion started by: larryase
2 Replies

6. SuSE

CD Bootable OS

Hi, I want to create a CD that is bootable containing a working Linux OS ie OS runs from CD and not harddrive. Will probably install Linux to a 650GB partition , including all the bits I need. How would I then use this partition to create a working CD? Ideas and Web sites with info very... (5 Replies)
Discussion started by: markdr011
5 Replies

7. UNIX for Dummies Questions & Answers

bootable

hw can i prepaer bootable floopy in Solaris as well as SCO Unix thx (1 Reply)
Discussion started by: girish_shukla
1 Replies

8. Filesystems, Disks and Memory

bootable cd

how can i create a bootable cd? i have the .iso thingy, and now i only need to put it on the cd, but do i need something special to do it w/? or just burn it right onto the cd? Ive already set cd to 1st in bios. thanx anyways (1 Reply)
Discussion started by: thenewestuser
1 Replies

9. UNIX for Dummies Questions & Answers

bootable CD

Hey all, I'm trying to make a backup bootable CD of a solaris 7 machine. I have no idea where to start so I did alot a reading :-) Even though I've done alot of reading I still don't know what is the best way of going about it all. What I am after as a finished result is a bootable CD... (1 Reply)
Discussion started by: merlin
1 Replies

10. UNIX for Dummies Questions & Answers

Bootable CD

Hi, I need to be able to make a back bootable CD for Solaris 7 + software on the system. As stated the CD needs to be a bootable one, I know it will more then likely have to be more then 1 CD and I don't mind. What would be a good program to do this? Also the best way to go about doing it.... (1 Reply)
Discussion started by: merlin
1 Replies

Featured Tech Videos