LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices


By Janux_NET at 2007-07-05 09:22
Now let's get started with the installation!

The idea of this “tutorial” to call it somehow is the one of being able to install/upgrade to Slackware 12 (you can prove with several other versions and until with other distributions if you want) in a PC or laptop that already has installed linux (Slackware 11 in my case), and having the ISO images of the CDs or DVD, but without at least having to record them, not even to have a boot diskette and much less to be able to boot from a usb pendrive because in this case our BIOS doesn't support it.

Situation: We have a PC or laptop with Slackware 11, I have a CDROM drive but not CD/DVD Writer, I have pendrive of >=64MB, I have floppy drive but not a single one disckette. We off course have at least an ADSL conection and the ISO images of Slackware 12 downloaded from it.


Requirements:

Any GNU/Linux installed in the equipment to use.
1x port USB
1x pendrive usb of >=64MB.
Connection to Internet with "good speed" to download th ISO images and 4 or 5 archives from the FTP site of Slackware.
Minimum of 2 partitions, in one of them with the /home mount point and double of free space that you need normally for having the ISO images (since you are going to "extract" the installation folders from here and replicate in another folder.)


Steps to follow:

1) Download the Slackware 12 ISO images from some mirror (“get slack” in www.slackware.com) - Note in my case I downloaded the ISOs of the 3 first CDs, that already brings all the necessary one for a decent installation: SLACKWARE + KDE + KDEi + EXTRAS
- The other discs contain the source code and aggregates who really nonmemory at this moment, but are not essential for a normal use.


2) You need to mount each ISO image in a mount point like /mnt:

#mkdir /mnt/cd1;mkdir /mnt/cd2;mkdir /mnt/cd3
- you notice semicolon between each command, it is to join them in a line.

#mount -o loop /place_where_the_iso_images_are/slackware-12.0-install-d1.iso /mnt/cd1
- in case of using the DVD, you need to change the name of the .iso file of course.

#mount -o loop /place_where_the_iso_images_are/slackware-12.0-install-d2.iso /mnt/cd2

#mount -o loop /place_where_the_iso_images_are/slackware-12.0-install-d3.iso /mnt/cd3


Now you must go to the /mnt/cd1 location and copy the folder slackware that inside contains the groups of packages that are folders as well: like AP, D, AND...etc, etc. to a folder within the /home partition.

Then the slackware folder inside the ISOs will be copied to something like this /home/user/slackware with all the subfolders inside…

Now do the same with the other discs mounted in /mnt/cd2 and /mnt/cd3.

Note: I recommend you to make the copy with some program that maintains the file permissions when copying them. For this you can use mc.


3) From some mirror of Slackware, for example ftp://slackware.mirrors.tds.net/, conect to it and go to the folder:
/pub/slackware/slackware-12.0/slackware/ (similar to the folder we have in: /home/user/slackware)

There, you must copy the files: CHECKSUMS.md5, CHECKSUMS.md5.asc, FILE_LIST, MANIFEST.bz2 and PACKAGES.TXT. to our folder /home/user/slackware and overwrite the existing ones.

- This is only in case of the setup of slackware verifies these files, since those that we had in /home/user/slackware came in the CDs and differ from those from the slackware mirror folder.


4) Connect the pendrive to the usb port, and from the console go to the location of the mounted CD2 in /mnt/cd2/ and execute this:

#cd usb-and-pxe-installers
#dd if=usbboot.img of=/dev/sda bs=512


- you need to change the /dev/sda name device if it's not your pendrive.
- BE CAREFUL! because if you have a SATA disk and you put wrong the device name here, you can loss all the data of your HD. So, make sure of that!
- in this case my disc this in /dev/hda, so it is not a problem.
- this operation eliminates any recorded previous data in the pendrive, but it does not damage it.
- to format the pendrive, later when you finish all the instalation and to be able to reuse it, you must read at the end of this note. Continue reading!


5) In the mounted CD1 (mnt/cd1) and within the folder kernels/hugesmp.s, execute this from console:

#cp * /boot

- /boot is the folder where are the compiled kernels of the GNU/Linux distribution we have installed.
- this command copy the System.map.gz, bzImage and config files that are the kernel 2.6.21.5 with smp support.
- Notice that if you has a “smaller” PC or laptop tan a Pentium Pro, you must use the kernel of the folder kernels/huge.s of the same CD1, that kernel support i486 CPUs.

-I use the hugesmp.s kernel for my Pentium II.

Now within the folder isolinux (yes in the CD1), execute this from console:

#cp initrd.img /boot


6) Change the /etc/lilo.conf file for being able to choose the new kernel at bootprompt and to load initrd.

It should see something like this: - the parts in Bold are those that correspond to the new kernel-


# LILO configuration cases out
# generated by “liloconfig”
#
# Start global LILO section
boot = /dev/hda
#compact # to faster, but won't work on all systems.
prompt
timeout = 30
# VESA to framebuffer console @ 1024x768x256
VGA = 773
# Normal VGA console
normal # VGA =
# VESA to framebuffer console @ 1024x768x64k
# vga=791
# VESA to framebuffer console @ 1024x768x32k
# vga=790
# VESA to framebuffer console @ 1024x768x256
# vga=773
# VESA to framebuffer console @ 800x600x64k
# vga=788
# VESA to framebuffer console @ 800x600x32k
# vga=787
# VESA to framebuffer console @ 800x600x256
# vga=771
# VESA to framebuffer console @ 640x480x64k
# vga=785
# VESA to framebuffer console @ 640x480x32k
# vga=784
# VESA to framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End global LILO section
# bootable Linux partition config begins
image = /boot/vmlinuz-2.6.21.5-300hz
root = /dev/hda1
label = Slack26-300hz
read-only # for Non-UMSDOS filesystems should be mounted read-only checking
image = /boot/vmlinuz-ide-2.4.33.3
root = /dev/hda1
label = Slackware11
read-only # for Non-UMSDOS filesystems should be mounted read-only checking
image = /boot/bzImage
root = /dev/sda
label = SlackINST
initrd = /boot/initrd.img
read-only # for Non-UMSDOS filesystems should be mounted read-only checking

# bootable Linux partition config ends


When you have all ready, you need to execute the lilo command to record the changes.

- It can show a “WARNING” message, like if you are writing data by above of certain limits and which the system must allow the reading over the 15MB-1MB "memoryhole", but don't worry! that's only a warning, it works on my PII 366MHz notebook.


7) Now, we need to reboot the machine and to choose SlackINST from bootloader.


8) Ok, if you was "driving" by the new kernel at the prompt of the Slackware installation, we are well!

Now within setup we are going to check if it can read the packages from our /home/user/slackware folder, and for that we are going to skip some steps of the installation process -for now only-.

Let's go to the section SOURCE that is where the system asks the media from which the system can read the new packages to install, that means: CDs, DVD, HD, NFS. But in our case, we will choose "From Harddisk" option.

Now the system asks in which volume or partition is the folder that contains the installation files/packages. So for us it is /home/usuario/slackware. Here you must answer the name of the partition, in my case is:

/dev/hda5
- that is where I have mounted the /home folder of my present Slacware 11.

After accepting that option (finally!), it requests to us the location of the installation folder where we have the packages.. yes, we know where is it!.

/user/slackware
- notice that I'm not wrote /home/usuario/slackware, because /home is already recongniced like /dev/hda5.

Accepting this step, setup will read the content of the folder and show you the screen of the selection categories of packages like A, AP,….and. And if the system do so... we are ready to begin with the installation step by step normally!!!, continue reading.

- STOP!, if you do not see all the categories of packages and see only one, like A, you need to CANCEL the process and do your reviews because there is an step that escape from your sight. So don't continue with the installation or it will be a mess.

As I trust that you did it well, do -cancel- in the window (SOURCE) and then start from the beginning of setup process by adding, for example, the swap volume, etc, etc, and then install!.


9) Well the whole step is completed, so:

REBOOT AND ENJOY YOUR "FRESH" NEW SLACKWARE 12 INSTALATION WITHOUT “MOVING” FROM YOUR PC/Laptop.


10) We need now to recover our pendrive so we can use it again!

Luckyly it is easy to format these devices from linux and thus to recreate FAT partition again.

a) First, wipe the bootsector of the pendrive, that means to fill the spacer with zeros.

Look at the name that the device has, since in my case it is /dev/sda.
Becouse if you have a SATA hardisk conected, you can destroy all the data of it. so be careful with the names!
And if you have a SATA hardisk in the machine, surely the device name of our pendrive will be /dev/sdb.

Ok, I assume that you know what I said. We are going then to rewrite zeros to him! - from console and as root execute:

#dd if=/dev/zero of=/dev/sda bs=512 count=1

b) Now we must create a new partition FAT/FAT32, and for this there ara many methods, although I prefer to do it with cfdisk that is just a little more simple an secure.

cfdisk /dev/sda

We create the primary partition, use the complete space and say the partition type (FAT32) and record!

We now have our pendrive back again and Slackware12 to use it!


Janux
http://cyberconex.cjb.net/BLOG

Buenos Aires, Argentina.

by pkzj on Wed, 2007-07-25 23:15
You can also do this without USB and without copying iso files to another directory.

1. Download the iso, dvd, or rsync to a directory as stated.

2. Mount the dvd iso or cd1 iso with the -o loop as indicated also. Then cd to the slackware directory that has all the package directory files. Also mount the partition where you want the slack12 to be installed. In my case it was /dev/sda3. If it is new then don't forget to mkfs.ext3 /dev/sda3 (or xfs or whatever FS you like. Then mkdir /mnt/sda3 and mount /dev/sda3 /mnt/sda3. Now you are ready for the install.

Example cd /mnt/iso/slackware:
root[slackware]# ls
CHECKSUMS.md5 FILE_LIST PACKAGES.TXT a d f kde l t x y
CHECKSUMS.md5.asc MANIFEST.bz2 README.TXT ap e k kdei n tcl xap

3. Run a quick command line script to include all the package directories you want to install. Here I left out kdei.

# for i in a ap d e f k kde l n t tcl x xap y
> do
> installpkg -root /mnt/sda3 $i/*.tgz
> done
This will take a while to install all the packages to target partition mounted as /mnt/sda3.

4. Then mkdir /slack12 and cp -a /mnt/target/boot/* /slack12. This will put a copy of the boot directory for the new install in your current root / directory in slack12 subdirectory.

5. Copy /etc/fstab to /mnt/target/etc and edit it for the new install mount points and devices. You should only have to change where / is mounted and can even use the same home directory if it's a separate mount point.

6. Edit /etc/lilo.conf to add a section for the new target but changing /boot/vmlinuz to /slack12/vmlinuz, and the root device to your target partition.
Example lilo.conf:
boot = /dev/sda
compact
prompt
timeout = 50
lba32
large-memory
vga=791
image = /boot/vmlinuz
root = /dev/sda1
label = Slack11
read-only
image = /slack12/vmlinuz
root = /dev/sda3
label = Slack12
read-only

7. Then run lilo and you can reboot to your new install.

8. Run pkgtool after logging in as root and select the setup scripts to configure it. Reboot to test.

You can also mount your old root partition and copy over /etc/passwd and /etc/shadow if you want to maintain the same home directory. You may also want to edit some new config files using the old ones as an example. I do NOT recommend mass copy of the etc directory as things have changed in 12.0 from 11.0.

by harryhaller on Sun, 2009-06-21 10:24
To compare the the new /etc (12.2) with the old /etc(12.1) run:

Code:
 
# run in "old" /etc

for f in *; 
do diff "$f" /mnt/slack12.2/etc/"$f" > ~/"$f".diffs 2>&1; 
done
This will also dive into the subdirectories and produce for a report for each one. You can then run a similar script in each subdirectory if you see a need.

Reports are sent to root's home directory, each named with the file name and a suffix "diff".

To delete the zero reports for files that haven't changed, run
Code:
find . -size 0b -exec  rm {} \;
against the "diffs" files in roots home directory.

Zero reports for subdirectories unfortunately don't have zero bytes because they write a confirmation that the directories are the same.

Thanks pkzj, that really does make installation even easier. Thanks too to Janux_NET for getting the ball rolling.


  



All times are GMT -5. The time now is 02:57 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration