LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Cool Trick - Run all 5 cds from HD (9.2 Pro) (https://www.linuxquestions.org/questions/suse-opensuse-60/cool-trick-run-all-5-cds-from-hd-9-2-pro-273056/)

apachedude 01-02-2005 05:08 PM

Cool Trick - Run all 5 cds from HD (9.2 Pro)
 
Sorry if this is obvious to some of you, but I'd like to contribute in any way possible. Unfortunately, I'm a newbie.

Edit: Does anyone know how the search function in YaST works? I.e., how does YaST know what packages are available on the CDs, even before they are inserted into the drive?

So some people have been complaining about the need to juggle 5 CDs when wanting to install packages via YaST. There's a way to eliminate this need, and moreover, run the packages from the faster hard drive.

First you'll need to rip your CDs into an ISO image. Although you can name your files anything you want, you should do it systematically. I tend to use suse1.iso, suse2.iso, etc. I put these in a directory called /isos.

Now you'll need a directory on your hard drive to mount your hard drive too. I suggest /suse (a directory on your root folder).

Now mount the first .iso image onto your /suse directory with mount -o loop -t iso9660 /isos/suse1.iso /suse. Note you'll have to change /isos to reflect wherever your ISO images reside, and /suse to whereever you'd like to mount your images.

After that, go to YaST->YaST2 Modules->Software->Change Source of Installation. Add a Local Directory and specify the directory as /suse (or again, wherever you decided to mount your CDs).

So now you can search for packages in Software Install. But it'll ask you to change disks occasionally. Keep in mind these are no longer physical CDs, but rather, the images on your hard drive. So now if it asks you for CD 2, you mount -o loop -t iso9660 /isos/suse2.iso /suse.

Doing this frequently is, of course, a pain. So I've written a Perl script to simplify the process.

Code:

#! /usr/bin/perl

print "Which CD to mount? ";

system("umount /suse");

$mount = <STDIN>;
chomp $mount;
$mount = int($mount);

$mount = 1 unless($mount >= 2 && $mount <= 5);

system("mount -o loop -t iso9660 /isos/suse$mount.iso /suse");

Save this as mount.pl (or whatever strikes your fancy). Make sure to edit the path in the first line to reflect where your perl interpreter is (if you don't know, go to command line and whereis perl).

Give yourself executable privileges to this file (chmod 777 mount.pl in the appropriate directory). Now when it asks you for CD 2, just perl mount.pl. Then type 2 when the script prompts you for an input.

To make this even easier, of course, you can put the script on your desktop. I use KDE, and I told it to run all .pl files with the perl interpreter via the terminal. So now changing CDs for me in YaST is a click and a keystroke.

Caeda 01-02-2005 05:55 PM

You really need to spend the 25$ it costs for a plain on frills dvd drive...

KohlyKohl 01-03-2005 01:58 PM

Not everyone has the dvd you know.

Caeda 01-03-2005 04:09 PM

The title of the thread is...

"Cool Trick - Run all 5 cds from HD (9.2 Pro)"

you know. So just maybe possibly the people interested in this thread do.

xbaez 01-04-2005 01:42 PM

I appreciate the trick
THanks for this, I tried installing the CDs one by one and never worked.
Apartently, the CD reads the initrd file in CD1, and all the other CDs are impossible to install

And for the guy that made the DVD comment, you might have a DVD, but I'm sure that many people don't have a DVD recorder.

ISO images usually make sense when you want to have a backup of files. In the office, I made these ISO images to have backups of the original CDs (burn them again if we need them), and to have a way to install this over a network.

It's a shame that SUSE does not supports Network installations.

xbaez 01-04-2005 02:19 PM

I receive the message:

"Only root can do that"

I don't know about Perl, so how can this switch to root before doing it?
Or how can I make all the users excecute mount?

xbaez 01-04-2005 03:18 PM

I tried modifying the /etc/fstab file


/mnt/samba/Downloads/Linux/Distributions/suse/CD1.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD2.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD3.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD4.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD5.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0


Didn't worked. "Only root can do that"

Then, I tried this
chmod 666 /dev/loop*
In order to be able to mount with the -o loop function, I received this message:

Which CD to mount? umount: /mnt/suse is not in the fstab (and you are not root)
2
mount: going to use the loop device /dev/loop1
memlock: Cannot allocate memory
Couldn't lock into memory, exiting.


Any suggestions?

I then added xavier to ALL the groups of /etc/passwd, so that I can have more privileges

Still, the same error

xbaez 01-04-2005 03:28 PM

I made the script run in terminal, and as super user

so now I have to pass in the password every time I want to run the script.

I apperciate this post, since I need to upgrade SuSE 8.2 to SuSE 9.2 here at work and I also have SuSE 9.2 on my desktop and I don't want to manipulate the original CDs in order to update my server.

One comment though.

Mandrake urmpi is SO MUCH BETTER, I can even select a website to update my system

apachedude 01-04-2005 04:29 PM

Sorry guys, I wrote this post hopefully to help others out. Turns out I'm the one that needs the help. =)

Anyone manage to search CDs 2-5 from HD?

DavidPhillips 01-04-2005 09:15 PM

Quote:

It's a shame that SUSE does not supports Network installations.
That's the only way I have ever installed it.

DavidPhillips 01-04-2005 09:18 PM

[QOUTE]Anyone manage to search CDs 2-5 from HD?[/QUOTE]


If you mount them to the same folder would you unmount one before the other is mounted.

1kyle 01-05-2005 06:11 AM

If you have "Windoze" and NERO you can burn CD's as a "Virtual Image" so what you could do is try this

Burn a "Bootable" DVD containing the data from all 5 CD's.

Now assuming you don't have a DVD recorder you'll have to find a way of mounting this DVD as a "Virtual Drive" --can be done in 'Doze with Nero's software --I use this method to mount "Virtual Audio CD's" to get round stupid Sony's Music DRM / SCMS / Open (????) MG or all the other stupid things the music industry does to stop you COPYING YOUR OWN MUSIC !!!!!

If you don't need to Boot the DVD but just use it as a source of installation then mounting it as a source DVD should work --Burn it as an ISO then rather than as NRG (Nero's format)

Cheers
-K

gd2shoe 01-06-2005 03:43 AM

Quote:

Originally posted by xbaez
....
It's a shame that SUSE does not supports Network installations.

Where have you been hiding?

Quote:

Originally posted by DavidPhillips
....
That's the only way I have ever installed it.

Here, here!

Seriously, I have a different set of suggestions. You can get most packages via ftp from one of the mirrors. If you have broadband, I suggest adding an ftp source. Each package downloaded is md5sumed, to ensure accuracy. You can find a list of official mirrors here: http://www.suse.com/en/private/downl...t_mirrors.html

(SuSE 9.1 is found in i386/9.1, for example. Each server keeps it in a slightly different place. You will need to hunt around for a moment.)

I wouldn't really suggest it, but you can download the entire 7.3 GB from the mirrors and keep it in a directory on your hard disk. You might even be able to look at the structure of the folder on the mirror, and copy all CD content to a directory on the drive (I wouldn't count on it though).

Quote:

Originally posted by xbaez
....
/mnt/samba/Downloads/Linux/Distributions/suse/CD1.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD2.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD3.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD4.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0
/mnt/samba/Downloads/Linux/Distributions/suse/CD5.img /mnt/suse iso9660 loop,uid=1000,gid=100 0 0

If I didn't have broadband, I might also try something like this (with loopfiles). I think you need to add "user" to your option list. I've never tried putting a loopfile in fstab, so I couldn't tell you if it is possible or not (hope it is). You might need to specify which loop device to use (change "loop" to "loop=/dev/loop2"; there are 16 loop devices, 0-15; you can only use one loop device per file at any given time.)

--
Edited for spelling.

DavidPhillips 01-06-2005 01:11 PM

I have installed it from a miiror using a boot floppy. That's the easiest way if your planning an install and do not have the storage for files, etc.

The boot floppy is pretty much self guided with a couple of issues. You need to manually load some modules from the menu before you can connect. Like if you have a router using dhcp or static ip setup on the LAN that is providing your connection you may need to back out of the part where you enter the ftp site and enter the modules loading menu to load your nic driver. That's about it.

gd2shoe 01-07-2005 12:00 AM

I usually use /boot/boot.iso . Sounds about the same. I'll usually boot with knoppix first and let it figure out for me which module I should use ;)


All times are GMT -5. The time now is 09:50 PM.