View Full Version : Re: Turning CD iso into RH9 DVD
Pacman
2003-09-22, 02:52 PM CDT
The perl script I posted takes all the CD-ISO images, mounts them and
then merges them into a single installable DVD image. All the RPMS are
under a single RPM directory, the DVD is bootable and the installation
tools see the DVD as a single unified RedHat install disc, not 6
seperate images. I think it does exactly what you are asking for, no?
A big DVD install disc vs. a bunch of single CDs.
Here's the script again for reference:
#!/usr/bin/perl
#
# This is a perl util to make a DVD from RedHat 9 iso CD discs
#
# Howto:
# 1st: You'll need about 7.5GB if free space.
# 2nd: You'll need root permissions so mkisofs can mount and umount
#
# 1) Download the RH9 ISOs from /pub/redhat/linux/9/en/iso/i386
# 2) Place them all in a directory with this script
# 3) chmod +x ./make_disc
# 4) sudo ./make_disc
# 5) You'll have a DVD iso image that can be burned using your fav.
program
use File::Path;
# The file prefixes
$rhname = "shrike-i386-disc";
$rhsname = "shrike-SRPMS-disc";
# Make the directories for the loop back mounts
$mk_dir = "mkdir ./$rhname"."{1,2,3,4,5,6}";
$cmd_res = `$mk_dir`;
# Mount the files RH9 uses SRPMS and i386 discs, but to the RH system
they are all i386 in the
# .discinfo file numbered 1..6 so we will mount them all under the same
naming convention for
# convenience.
$s = 1;
for($x = 1 ; $x < 4 ; $x++) {
$mnt_res = `mount -o ro,loop ./$rhname$x.iso ./$rhname$x`;
$s = $x+3;
$mnt_res = `mount -o ro,loop ./$rhsname$x.iso ./$rhname$s`;
}
# Copy out the isolinux and the .discinfo files from Disc1 and modify
..discinfo
$disc1 = "$rhname"."1";
`cp -r ./$disc1/.discinfo .`;
`cp -r ./$disc1/isolinux .`;
`awk '{ nlines++ ; if(nlines == 4) { print \"1,2,3,4,5,6\" } else {
print \$0 }}' ./.discinfo > .discinfo.tmp`;
rename("./.discinfo.tmp","./.discinfo") or die "Couldn't rotate
..discinfo file\n";
# Naming...
$MKISO = "mkisofs -o shrike-i386-\*dvd\*.iso ";
# Setup boot stuff using El Torito
$MKISO .= "-b isolinux/isolinux.bin -c isolinux/boot.cat ";
$MKISO .= "-no-emul-boot -boot-load-size 4 -boot-info-table ";
# Rockridge extensions and trans
$MKISO .= "-R -m TRANS.TBL ";
# What to exclude from the primary disc
$MKISO .= "-x $disc1/.discinfo -x $disc1/isolinux ";
# What to replace it with. Use the .discinfo edited above and the
isolinux directory
$MKISO .= "-graft-points $disc1 .discinfo=.discinfo isolinux/=isolinux
";
# Then append the directories needed from the other discs
$MKISO .= "RedHat/=$rhname"."2/RedHat RedHat/=$rhname"."3/RedHat ";
$MKISO .= "SRPMS/=$rhname"."4/SRPMS SRPMS/=$rhname"."5/SRPMS
SRPMS/=$rhname"."6/SRPMS ";
# Make the disc
`$MKISO`;
# Clean-up
$s = 1;
for($x = 1 ; $x < 7 ; $x++) {
$mnt_res = `umount ./shrike-i386-disc$x`;
rmtree("./shrike-i386-disc$x");
}
rmtree("./isolinux");
unlink("./.discinfo");
P-
In article <ko8rmv0u08qvbc9kfjo6so4rlha079ctn3@4ax.com>, Tim
<admin@sheerhell.lan> wrote:
> On Sat, 13 Sep 2003 Tim wrote:
>
> >> Why did they go through this convoluted process for an installation
> >> DVD?
>
>
> Vwakes <vwakeNOSPAM100@softhome.net> wrote:
>
> > You mean RH?
>
> Yes.
>
> >> Wouldn't it have been better to have just used it as one large disc
> >> with the RPM files in it, rather than the ISO images of the CD-ROMs?
>
> > Why, that's how it is now? Is it not?
>
> The last time I saw anybody describe the DVD install disk, it was a DVD
> with ISOs of all the installation CD-ROMs. One DVD with a few huge
> files, plus the few things needed to handle them.
>
> (Yes, I haven't played with one, I'm just going by what was written
> about it. I've also read about that being the way that people create
> their own RedHat install DVD.)
>
> Now, someone tell me why the DVD couldn't be just like one huge install
> CD-ROM, with all the /RedHat/RPMS from each CD-ROM in the one
> /RedHat/RPMS directory on the DVD? An installation routine just needs
> the RPMs, it doesn't *need* to have them separated into three different
> locations.
--
#############
Imagination is more important than knowledge - A. Einstein
Vertigo1
2004-01-05, 09:30 PM CST
Using your script, problem I am having is that it seems to only make a
645MB ISO image, nothing near a DVD image. Could it be the version
of mkisofs I am using?
mkisofs -v
ouput: mkisofs 2.01a17 (i686-pc-linux-gnu)
I ran this 3 times and get the same results each time.
On Sat, 13 Sep 2003 07:21:05 GMT, Pacman <piercer@nospam_pacbell.net>
wrote:
>
>I saw an article a few weeks back on how to do this for RH8 so I put
>together a perl script and made the requisite changes (it could have
>easily been done in your favorite _sh, but I like perl) - it installed
>fine.
>
>All you need to do is download or get the iso images into a directory
>and run the script, you'll need root privs for the mounting. I didn't
>include the doc disc in this, but it should be straight forward if you
>want to add it. Oh, and you'll need about 7.5GB between the iso and the
>DVD image.
>
>-P
>
>===============
>
>#!/usr/bin/perl
>
>#
># This is a perl util to make a DVD from RedHat 9 iso CD discs
>#
># Howto:
># 1st: You'll need about 7.5GB if free space.
># 2nd: You'll need root permissions so mkisofs can mount and umount
>#
># 1) Download the RH9 ISOs from /pub/redhat/linux/9/en/iso/i386
># 2) Place them all in a directory with this script
># 3) chmod +x ./make_disc
># 4) sudo ./make_disc
># 5) You'll have a DVD iso image that can be burned using your fav.
>program
>
>use File::Path;
>
># The file prefixes
>$rhname = "shrike-i386-disc";
>$rhsname = "shrike-SRPMS-disc";
>
># Make the directories for the loop back mounts
>$mk_dir = "mkdir ./$rhname"."{1,2,3,4,5,6}";
>$cmd_res = `$mk_dir`;
>
># Mount the files RH9 uses has SRPMS and i386 discs, but to the RH
>system they are all i386 in the
># .discinfo file numbered 1..6 so we will mount them all under the same
>naming convention for
># convenience.
>
>$s = 1;
>for($x = 1 ; $x < 4 ; $x++) {
> $mnt_res = `mount -o ro,loop ./$rhname$x.iso ./$rhname$x`;
> $s = $x+3;
> $mnt_res = `mount -o ro,loop ./$rhsname$x.iso ./$rhname$s`;
> }
>
># Copy out the isolinux and the .discinfo files from Disc1 and modify
>.discinfo
>
>$disc1 = "$rhname"."1";
>`cp -r ./$disc1/.discinfo .`;
>`cp -r ./$disc1/isolinux .`;
>
># This basically tells the RH installer that all the discs are together
># on a single disc. vs the old entry which was just 1.
>`awk '{ nlines++ ; if(nlines == 4) { print \"1,2,3,4,5,6\" } else {
>print \$0 }}' ./.discinfo > .discinfo.tmp`;
>rename("./.discinfo.tmp","./.discinfo") or die "Couldn't rotate
>.discinfo file\n";
>
># Naming...
>$MKISO = "mkisofs -o shrike-i386-\*dvd\*.iso ";
>
># Setup boot stuff using El Torito
>$MKISO .= "-b isolinux/isolinux.bin -c isolinux/boot.cat ";
>$MKISO .= "-no-emul-boot -boot-load-size 4 -boot-info-table ";
>
># Rockridge extensions and trans
>$MKISO .= "-R -m TRANS.TBL ";
>
># What to exclude from the primary disc
>$MKISO .= "-x $disc1/.discinfo -x $disc1/isolinux ";
>
># What to replace it with. Use the .discinfo edited above and the
>isolinux directory
>$MKISO .= "-graft-points $disc1 .discinfo=.discinfo isolinux/=isolinux
>";
>
># Then append the directories needed from the other discs
>$MKISO .= "RedHat/=$rhname"."2/RedHat RedHat/=$rhname"."3/RedHat ";
>$MKISO .= "SRPMS/=$rhname"."4/SRPMS SRPMS/=$rhname"."5/SRPMS
>SRPMS/=$rhname"."6/SRPMS ";
>
># Make the disc
>`$MKISO`;
>
># Clean-up
>$s = 1;
>for($x = 1 ; $x < 7 ; $x++) {
> $mnt_res = `umount ./shrike-i386-disc$x`;
> rmtree("./shrike-i386-disc$x");
> }
>
>rmtree("./isolinux");
>unlink("./.discinfo");
Vertigo1
2004-01-05, 09:30 PM CST
Using your script, problem I am having is that it seems to only make a
645MB ISO image, nothing near a DVD image. Could it be the version
of mkisofs I am using?
mkisofs -v
ouput: mkisofs 2.01a17 (i686-pc-linux-gnu)
I ran this 3 times and get the same results each time.
On Sat, 13 Sep 2003 07:21:05 GMT, Pacman <piercer@nospam_pacbell.net>
wrote:
>
>I saw an article a few weeks back on how to do this for RH8 so I put
>together a perl script and made the requisite changes (it could have
>easily been done in your favorite _sh, but I like perl) - it installed
>fine.
>
>All you need to do is download or get the iso images into a directory
>and run the script, you'll need root privs for the mounting. I didn't
>include the doc disc in this, but it should be straight forward if you
>want to add it. Oh, and you'll need about 7.5GB between the iso and the
>DVD image.
>
>-P
>
>===============
>
>#!/usr/bin/perl
>
>#
># This is a perl util to make a DVD from RedHat 9 iso CD discs
>#
># Howto:
># 1st: You'll need about 7.5GB if free space.
># 2nd: You'll need root permissions so mkisofs can mount and umount
>#
># 1) Download the RH9 ISOs from /pub/redhat/linux/9/en/iso/i386
># 2) Place them all in a directory with this script
># 3) chmod +x ./make_disc
># 4) sudo ./make_disc
># 5) You'll have a DVD iso image that can be burned using your fav.
>program
>
>use File::Path;
>
># The file prefixes
>$rhname = "shrike-i386-disc";
>$rhsname = "shrike-SRPMS-disc";
>
># Make the directories for the loop back mounts
>$mk_dir = "mkdir ./$rhname"."{1,2,3,4,5,6}";
>$cmd_res = `$mk_dir`;
>
># Mount the files RH9 uses has SRPMS and i386 discs, but to the RH
>system they are all i386 in the
># .discinfo file numbered 1..6 so we will mount them all under the same
>naming convention for
># convenience.
>
>$s = 1;
>for($x = 1 ; $x < 4 ; $x++) {
> $mnt_res = `mount -o ro,loop ./$rhname$x.iso ./$rhname$x`;
> $s = $x+3;
> $mnt_res = `mount -o ro,loop ./$rhsname$x.iso ./$rhname$s`;
> }
>
># Copy out the isolinux and the .discinfo files from Disc1 and modify
>.discinfo
>
>$disc1 = "$rhname"."1";
>`cp -r ./$disc1/.discinfo .`;
>`cp -r ./$disc1/isolinux .`;
>
># This basically tells the RH installer that all the discs are together
># on a single disc. vs the old entry which was just 1.
>`awk '{ nlines++ ; if(nlines == 4) { print \"1,2,3,4,5,6\" } else {
>print \$0 }}' ./.discinfo > .discinfo.tmp`;
>rename("./.discinfo.tmp","./.discinfo") or die "Couldn't rotate
>.discinfo file\n";
>
># Naming...
>$MKISO = "mkisofs -o shrike-i386-\*dvd\*.iso ";
>
># Setup boot stuff using El Torito
>$MKISO .= "-b isolinux/isolinux.bin -c isolinux/boot.cat ";
>$MKISO .= "-no-emul-boot -boot-load-size 4 -boot-info-table ";
>
># Rockridge extensions and trans
>$MKISO .= "-R -m TRANS.TBL ";
>
># What to exclude from the primary disc
>$MKISO .= "-x $disc1/.discinfo -x $disc1/isolinux ";
>
># What to replace it with. Use the .discinfo edited above and the
>isolinux directory
>$MKISO .= "-graft-points $disc1 .discinfo=.discinfo isolinux/=isolinux
>";
>
># Then append the directories needed from the other discs
>$MKISO .= "RedHat/=$rhname"."2/RedHat RedHat/=$rhname"."3/RedHat ";
>$MKISO .= "SRPMS/=$rhname"."4/SRPMS SRPMS/=$rhname"."5/SRPMS
>SRPMS/=$rhname"."6/SRPMS ";
>
># Make the disc
>`$MKISO`;
>
># Clean-up
>$s = 1;
>for($x = 1 ; $x < 7 ; $x++) {
> $mnt_res = `umount ./shrike-i386-disc$x`;
> rmtree("./shrike-i386-disc$x");
> }
>
>rmtree("./isolinux");
>unlink("./.discinfo");
Vertigo1
2004-01-05, 09:30 PM CST
Using your script, problem I am having is that it seems to only make a
645MB ISO image, nothing near a DVD image. Could it be the version
of mkisofs I am using?
mkisofs -v
ouput: mkisofs 2.01a17 (i686-pc-linux-gnu)
I ran this 3 times and get the same results each time.
On Sat, 13 Sep 2003 07:21:05 GMT, Pacman <piercer@nospam_pacbell.net>
wrote:
>
>I saw an article a few weeks back on how to do this for RH8 so I put
>together a perl script and made the requisite changes (it could have
>easily been done in your favorite _sh, but I like perl) - it installed
>fine.
>
>All you need to do is download or get the iso images into a directory
>and run the script, you'll need root privs for the mounting. I didn't
>include the doc disc in this, but it should be straight forward if you
>want to add it. Oh, and you'll need about 7.5GB between the iso and the
>DVD image.
>
>-P
>
>===============
>
>#!/usr/bin/perl
>
>#
># This is a perl util to make a DVD from RedHat 9 iso CD discs
>#
># Howto:
># 1st: You'll need about 7.5GB if free space.
># 2nd: You'll need root permissions so mkisofs can mount and umount
>#
># 1) Download the RH9 ISOs from /pub/redhat/linux/9/en/iso/i386
># 2) Place them all in a directory with this script
># 3) chmod +x ./make_disc
># 4) sudo ./make_disc
># 5) You'll have a DVD iso image that can be burned using your fav.
>program
>
>use File::Path;
>
># The file prefixes
>$rhname = "shrike-i386-disc";
>$rhsname = "shrike-SRPMS-disc";
>
># Make the directories for the loop back mounts
>$mk_dir = "mkdir ./$rhname"."{1,2,3,4,5,6}";
>$cmd_res = `$mk_dir`;
>
># Mount the files RH9 uses has SRPMS and i386 discs, but to the RH
>system they are all i386 in the
># .discinfo file numbered 1..6 so we will mount them all under the same
>naming convention for
># convenience.
>
>$s = 1;
>for($x = 1 ; $x < 4 ; $x++) {
> $mnt_res = `mount -o ro,loop ./$rhname$x.iso ./$rhname$x`;
> $s = $x+3;
> $mnt_res = `mount -o ro,loop ./$rhsname$x.iso ./$rhname$s`;
> }
>
># Copy out the isolinux and the .discinfo files from Disc1 and modify
>.discinfo
>
>$disc1 = "$rhname"."1";
>`cp -r ./$disc1/.discinfo .`;
>`cp -r ./$disc1/isolinux .`;
>
># This basically tells the RH installer that all the discs are together
># on a single disc. vs the old entry which was just 1.
>`awk '{ nlines++ ; if(nlines == 4) { print \"1,2,3,4,5,6\" } else {
>print \$0 }}' ./.discinfo > .discinfo.tmp`;
>rename("./.discinfo.tmp","./.discinfo") or die "Couldn't rotate
>.discinfo file\n";
>
># Naming...
>$MKISO = "mkisofs -o shrike-i386-\*dvd\*.iso ";
>
># Setup boot stuff using El Torito
>$MKISO .= "-b isolinux/isolinux.bin -c isolinux/boot.cat ";
>$MKISO .= "-no-emul-boot -boot-load-size 4 -boot-info-table ";
>
># Rockridge extensions and trans
>$MKISO .= "-R -m TRANS.TBL ";
>
># What to exclude from the primary disc
>$MKISO .= "-x $disc1/.discinfo -x $disc1/isolinux ";
>
># What to replace it with. Use the .discinfo edited above and the
>isolinux directory
>$MKISO .= "-graft-points $disc1 .discinfo=.discinfo isolinux/=isolinux
>";
>
># Then append the directories needed from the other discs
>$MKISO .= "RedHat/=$rhname"."2/RedHat RedHat/=$rhname"."3/RedHat ";
>$MKISO .= "SRPMS/=$rhname"."4/SRPMS SRPMS/=$rhname"."5/SRPMS
>SRPMS/=$rhname"."6/SRPMS ";
>
># Make the disc
>`$MKISO`;
>
># Clean-up
>$s = 1;
>for($x = 1 ; $x < 7 ; $x++) {
> $mnt_res = `umount ./shrike-i386-disc$x`;
> rmtree("./shrike-i386-disc$x");
> }
>
>rmtree("./isolinux");
>unlink("./.discinfo");
Vertigo1
2004-01-05, 09:30 PM CST
Using your script, problem I am having is that it seems to only make a
645MB ISO image, nothing near a DVD image. Could it be the version
of mkisofs I am using?
mkisofs -v
ouput: mkisofs 2.01a17 (i686-pc-linux-gnu)
I ran this 3 times and get the same results each time.
On Sat, 13 Sep 2003 07:21:05 GMT, Pacman <piercer@nospam_pacbell.net>
wrote:
>
>I saw an article a few weeks back on how to do this for RH8 so I put
>together a perl script and made the requisite changes (it could have
>easily been done in your favorite _sh, but I like perl) - it installed
>fine.
>
>All you need to do is download or get the iso images into a directory
>and run the script, you'll need root privs for the mounting. I didn't
>include the doc disc in this, but it should be straight forward if you
>want to add it. Oh, and you'll need about 7.5GB between the iso and the
>DVD image.
>
>-P
>
>===============
>
>#!/usr/bin/perl
>
>#
># This is a perl util to make a DVD from RedHat 9 iso CD discs
>#
># Howto:
># 1st: You'll need about 7.5GB if free space.
># 2nd: You'll need root permissions so mkisofs can mount and umount
>#
># 1) Download the RH9 ISOs from /pub/redhat/linux/9/en/iso/i386
># 2) Place them all in a directory with this script
># 3) chmod +x ./make_disc
># 4) sudo ./make_disc
># 5) You'll have a DVD iso image that can be burned using your fav.
>program
>
>use File::Path;
>
># The file prefixes
>$rhname = "shrike-i386-disc";
>$rhsname = "shrike-SRPMS-disc";
>
># Make the directories for the loop back mounts
>$mk_dir = "mkdir ./$rhname"."{1,2,3,4,5,6}";
>$cmd_res = `$mk_dir`;
>
># Mount the files RH9 uses has SRPMS and i386 discs, but to the RH
>system they are all i386 in the
># .discinfo file numbered 1..6 so we will mount them all under the same
>naming convention for
># convenience.
>
>$s = 1;
>for($x = 1 ; $x < 4 ; $x++) {
> $mnt_res = `mount -o ro,loop ./$rhname$x.iso ./$rhname$x`;
> $s = $x+3;
> $mnt_res = `mount -o ro,loop ./$rhsname$x.iso ./$rhname$s`;
> }
>
># Copy out the isolinux and the .discinfo files from Disc1 and modify
>.discinfo
>
>$disc1 = "$rhname"."1";
>`cp -r ./$disc1/.discinfo .`;
>`cp -r ./$disc1/isolinux .`;
>
># This basically tells the RH installer that all the discs are together
># on a single disc. vs the old entry which was just 1.
>`awk '{ nlines++ ; if(nlines == 4) { print \"1,2,3,4,5,6\" } else {
>print \$0 }}' ./.discinfo > .discinfo.tmp`;
>rename("./.discinfo.tmp","./.discinfo") or die "Couldn't rotate
>.discinfo file\n";
>
># Naming...
>$MKISO = "mkisofs -o shrike-i386-\*dvd\*.iso ";
>
># Setup boot stuff using El Torito
>$MKISO .= "-b isolinux/isolinux.bin -c isolinux/boot.cat ";
>$MKISO .= "-no-emul-boot -boot-load-size 4 -boot-info-table ";
>
># Rockridge extensions and trans
>$MKISO .= "-R -m TRANS.TBL ";
>
># What to exclude from the primary disc
>$MKISO .= "-x $disc1/.discinfo -x $disc1/isolinux ";
>
># What to replace it with. Use the .discinfo edited above and the
>isolinux directory
>$MKISO .= "-graft-points $disc1 .discinfo=.discinfo isolinux/=isolinux
>";
>
># Then append the directories needed from the other discs
>$MKISO .= "RedHat/=$rhname"."2/RedHat RedHat/=$rhname"."3/RedHat ";
>$MKISO .= "SRPMS/=$rhname"."4/SRPMS SRPMS/=$rhname"."5/SRPMS
>SRPMS/=$rhname"."6/SRPMS ";
>
># Make the disc
>`$MKISO`;
>
># Clean-up
>$s = 1;
>for($x = 1 ; $x < 7 ; $x++) {
> $mnt_res = `umount ./shrike-i386-disc$x`;
> rmtree("./shrike-i386-disc$x");
> }
>
>rmtree("./isolinux");
>unlink("./.discinfo");
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.