HOWTO: Net-install Slackware(-current) as a dual-boot from within an exisiting Linux
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By manzdagratiano at 2011-05-26 11:46
This is the second time (the first was the 32-bit version, this time it was a replacement of that by 64-bit) I have succeeded in net-installing Slackware-current from inside another GNU/Linux distribution as a dual boot (well, actually a quintuple boot in my case), and I would like to share a consolidated version of that here, since no one place had all the information I used to that end. The ideas here stem from the following thread:
http://www.linuxquestions.org/questions/slackware-installation-40/install-slackware-to-a-folder-using-chroot-825598/
The goal here is a little different from there, where the objective was to install Slackware inside a chroot. In fact, for a dual boot option, I would go so far as to recommend this method always over the traditional method - it is less hassle than with burning disks or writing to a USB drive. Also, for those of us who are lazy and blessed with a broadcom-wifi card, this is the only other alternative to Alien Bob's mini-iso.
I welcome any suggestions for improvements/enhancements.
I shall use Ubuntu/Debian as the host example (although this should, in principle, work for any), with Slackware-current as the target. Note that this requires the installation of Slackware's pkgtools inside Ubuntu/Debian, therefore I suspect that Arch Linux would not be a good place to do this because both Arch and Slackware share the 'makepkg' command, and Slackware's version may overwrite it. That being said, I see no reason why it cannot be overwritten and re-overwritten again.
The target partition was /dev/sda8. I shall be using the ext4 filesystem, and I have set up the system to share swap space with all the other distros. Also, as there need be only one grub on the system, I have not tried to create a separate boot partition.
Ergo, we begin thus:
INSTALLATION:
Quote:
Prepare the target partition:
Code:
$ mkfs.ext4 /dev/sda8
Mount it at the desired location
Code:
$ sudo mount /dev/sda8 /mnt
Grab hold of the pkgtools*.tgz package from a Slackware mirror, under the 'a' directory.
Convert this now to a .deb package, through the use of 'alien' (As of this writing, the latest release version of Slackware is 13.37):
Code:
$ sudo alien -i pkgtools-13.37-noarch-9.tgz
This command creates as .deb package as well as installs it.
Now we need to obtain a local slackware mirror. One can in principle write a script to retrieve packages while installing them, but it amounts to the same thing. Hence, in the Downloads folder, or any other folder, perform:
To create the entire mirror:
with the `-m' option implying that we are creating a local mirror of the tree we have chosen.
Change to the directory with the tree (it would be convenient to cut and paste the lowermost directory `slackware64' into the current folder directly to avoid dealing with a huge depth).
It is usually more practical to just download each individual series one wants to install - for instance, kde and kdei may not be required.
The series I myself use to set up a fully functional system are:
a, ap, d, f, k, l, n, tcl, x, xap
and the downloaded packages may be further fine-tuned for a customized system, eg., remove the X input/video drivers that the system does not need.
Therefore:
and so on for each series.
The good thing about this also is that one may download two or more series in parallel from different mirrors, speeding up the retrieval process.
Then, commence the installation from the `slackware64' directory:
Code:
$ cd ..
$ sudo installpkg --root /mnt {a,ap,d,f,k,l,n,tcl,x,xap}/*.t?z
CHROOT/SETUP:
Quote:
Now that the system has been installed, we may chroot to it:
Code:
$ sudo mount -t proc proc /mnt/proc
$ sudo mount -t sysfs sys /mnt/sys
$ sudo mount -o bind /dev /mnt/dev
and for network access:
Code:
$ sudo cp -L /etc/resolv.conf /mnt/etc
Code:
$ sudo chroot /mnt /bin/bash
Make system libraries available:
Code:
# ldconfig
The font cache may be updated as (if one wants to start X):
Add the hostname alias to the 127.0.0.1 line in /etc/hosts
Create fstab:
Code:
# nano -w /etc/fstab
A good start may be by copying over the host system's fstab and editing it accordingly.
Make sure that all the mount points defined therein are created on the system.
OPTIONAL: Install other tools from /extra, like jdk. `emacs' may also now be installed.
NETWORK:
Quote:
I usually like wicd over other interfaces, particularly because of its curses interface options, which I can use even from a TTY.
While inside the chroot, install wicd from the Slackware extras repository.
Code:
# slackpkg install wicd
Add the following to /etc/rc.d/rc.local:
Code:
if [ -x /etc/rc.d/rc.wicd ]; then
/etc/rc.d/rc.wicd start
fi
This allows wicd to start at boot.
Proprietary drivers like the broadcom-sta driver may be installed after reboot.
POST-INSTALL:
Quote:
Do not forget to run:
Code:
$ sudo update-grub
on the host system - as there is no need for more than one bootloader on the system, there is no need for grub/lilo to be installed in Slackware.
Setting up X may be perfomed on the first boot of the OS, by running:
Code:
# xorgsetup
PANIC CONTROL:
Quote:
The first boot actually resulted in kernel panic, with an error:
Code:
not syncing: VFS: unable to mount root FS on unknown-block
This meant that the requred filesystem support was not present in the kernel, and a regeneration of initrd.gz was called for.
Therefore, I reverted back to the chroot and executed:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.