Attempting to install Slackware from pre-existing Debian install on a remote server
I recent bought/leased a server from online.net and I'm looking to install Slackware64-14.1 on it (with the intention of upgrading to 14.1 when it's available).
The technical support team at online.net told me I could use debootstrap along with rescue mode to do my task, but I'm not remotely familiar with debootstrap. So I thought I might try a different way by editing the Debian /etc/grub.d/40_custom and loading the Slackware huge.s kernel and associated initrd.img from the installation DVD. So far, I've been successful in booting slackware on a test platform running Debian 8 (virtual machine), but I realize I'm going to have a problem accessing the machine once it's booted in Slackware as it will have no network configuration and ssh/dropbear won't be running. Now to my question(s), since I haven't toyed much with rebuilding an initrd. 1. Can I append a kernel parameter to Debian's 40_custom grub configuration to force an IP address? If so, how do I do this because I've already tried using the following: Code:
linux /huge.s ip=:::<ip address>:<netmask>::eth0:none 2. How can I get dropbear started automatically from the initrd? Do I need to rebuild it or is there an easier/better way? Finally, I'm confident I can install this way - provided I haven't overlooked anything. Your guidance is greatly appreciated! |
Ok, lesson learned. the "ip" kernel parameter is for NFSROOT. My apologies for not seeing that before. I have however rebuilt the stock initrd to include a stock rc.inet1 and rc.inet1.conf, so I'm confident I can get the ethernet controller up and running.
|
This document was written by kikinovak and is in French, but in the past, Google has done a decent job of translating things, plus the commands are all universal. It covers getting Slackware set up on servers from online.net.
http://www.microlinux.fr/microlinux/...ibox-HOWTO.txt |
I suspect you could also use the recovery environment (mentioned in kikinovak's article) to bootstap the installer, e.g.:
Now you can proceed to install the normal way via partitioning the disk and then running setup. Just remember to do a network install and point at mirror you selected earlier. |
Quote:
|
Quote:
|
Well, long story short. I rebuilt the Slackware installer initrd, made necessary changes to the Debian grub.cfg and rebooted. The machine booted as far as bringing eth0 up, but I couldn't ssh into it. I cut my losses and tried using rescue mode (Ubuntu 14.04 iirc) and chroot into the installer, no joy.
Finally, I followed kikinovaks documentation, and I can happily say that I'm the proud maintainer of a new Slackware machine! I plan on deploying it to provide as many mirrors of Slackware, LiveSlack, etc. |
I am using a similar server rented from online.net, it is running bear.alienbase.nl and more importantly, docs.slackware.com.
What I did to install Slackware was in a nutshell
|
Quote:
Quote:
|
Hi,
Since I happend to buy Dedibox XC SATA 2016 I decided to detail my method of Slackware installation. This mini HOWTO repeats some information from the previous posts and introduces some new information. It wouldn't be possible to write it without first following Alien Bob's instructions to have the first grasp. Thanks! The highlights (or not ;-)) of my method are: * full utilization of Slackware's installer provided tools (e.g. cfdisk), * tagfile based installation using HTTP mirror, * syslinux for booting, * generic kernel + initrd, * partition management with LVM2. Here it comes: 1. Login into online.net's console and choose your server from the server list. 2. Since Slackware installation is not supported by online.net, we will use [RESCUE] mode. [RESCUE] mode might not be available until there is some OS already installed, so use [INSTALL] action to install whichever distribution they support. After the installation has completed, [RESCUE] mode becomes available. But do not start it yet! 3. Basically, [RESCUE] mode starts selected (from predefined list) operating system, allowing you to interact with the hardware in, you guessed it, rescue mode ;-) But since [RESCUE] operating system takes some time to load, it is helpful to be able to watch the loading progress. Use [SERIAL CONSOLE] to get access to the serial console. It is important that you start [SERIAL CONSOLE] now, since the option disappears once [RESCUE] mode is started. 4. Now start [RESCUE] mode, choosing [Ubuntu 14.04 (amd64)] as the rescue operating system. Let the rescue OS load and then connect over ssh, using the details provided on the website. BTW, [SERIAL CONSOLE] seems to not always work in [RESCUE] mode (you cannot observe the booting progress), so you might just want to try to ssh into the rescue OS periodically, until the login succeeds. 5. Give yourself a bit more power: Code:
$ sudo su - Code:
$ mkdir /setup Code:
$ mount -t proc /proc proc I used --rbind instead of --bind. Using --bind seems to be a problem for correct operation of lvcreate. 8. Set terminal type, so that fonts are displayed correctly: a) if you login from X terminal: Code:
$ export TERM=xterm Code:
$ export TERM=linux See Appendix A for the exact commands I used to partition and format the hard drive. I prefer to use cfdisk for the task of partitioning. Since I am going to use LVM2 and it seems that syslinux does not support booting from LVM partitions, I created two partitions. The first one is going to be used for booting, that is, it is going to contain the kernel image, initrd and syslinux config file. The other partition is going to be managed by LVM. When creating partition table, I choose to use dos type as opposed to gpt type. For that reason, I cannot tell if gpt would work as well. The boot partition has to have the bootable flag set. As for the file system, I have chosen ext2. The size is set to 128MiB and should be more than sufficient. NOTE: I have seen the problem with the kernel not being notified about partition table change, but only once, and I do not recall under what conditions. If you are not able to correctly partition the drive from within the Slackware's setup chroot, then you might have more luck using the method explained before by Alien Bob. In addition, executing: Code:
$ partprobe Format the partitions. Although it can be done from within the setup program itself, I prefer to do it on the command line. This way you can watch the progress. (If you were installing locally, you would just switch to the VT, where the progress is being reported, but well, you are not installing locally and you do not have another VT ;-)). After partitioning, LVM-ing and formatting, I come up with the following partitions: Code:
/dev/sda1 (ext2, 128MiB, mbr, bootable) Code:
$ echo nameserver 62.210.16.6 >> /etc/resolv.conf 11. Run the setup program: Code:
$ setup 12. Once you get to [SOURCE MEDIA SELECTION], choose [Install from FTP/HTTP server] and provide the required details. I prefer to use the following: Code:
* URL OF FTP/HTTP SERVER: http://mirrors.kernel.org/ And if you wonder how I got my custom tagfiles available for the setup program, then the answer is: I scp'ed them from my local machine and then I upacked them under /setup/tagfile. This is possible, since you can have many ssh connections to the [RESCUE] operating system. See Appendix B for some more info on tagfiles. 13. Once the setup program has finished, there are a few tasks to be performed and they require that you chroot into your freshly installed Slackware, so do not reboot the machine when prompted now. What is more, you are going to chroot from already chroot'ed /setup directory. This is kinda important, because when the setup program fishes, it leaves your root partition mounted on /mnt and your boot partition mounted on /mnt/boot. Proceed as follows: Code:
$ chroot /mnt /bin/bash --login Execute the following commands to install syslinux/extlinux bootloader: Code:
$ extlinux --install /boot Code:
PROMPT 0 Please note that, the kernel and initrd paths specified in syslinux.cfg have to be relative. This is because syslinux is unable to read from LVM based root partition, so something like /boot/vmlinuz-generic wouldn't work. If you want to be able to login on the [SERIAL CONSOLE], you will have to uncomment the following: Code:
$ grep s2 /etc/inittab Code:
$ grep ttyS1 /etc/securetty Code:
$ grep c[1-6] /etc/inittab 15. initrd: Create /etc/mkinitrd.conf: Code:
# mkinitrd.conf Since my setup makes use of LVM, the LVM variable is set to 1. If you are not using LVM, then leave the value at 0. And remember to set ROOTDEV variable to point to the device on which your root filesystem is actually located. Once the /etc/mkinitrd.conf has been tuned, to create the initrd, run: Code:
$ mkinitrd -F While still in the Slackware installation chroot, you might consider performing some administrative tasks, like adding another user and setting up its key based ssh login. Remember that you can use scp to send all the files you need. For example, I edited /etc/fstab, so that /boot partition is mounted read-only and fsck is disabled. This could also be done once the system is booted. 17. Reboot: I am not sure, how much of these is necessary, but I did the following as a safety measure before rebooting the system: I exited the Slackware's installation chroot, back to the /setup chroot: Code:
$ exit Code:
$ cat /proc/mounts | grep mnt Code:
$ /sbin/vgchange -an My system has booted without any problems whatsoever. 18. Don't panic if you misconfigured something and the system does not boot. Use [SERIAL CONSOLE] to debug the problem and then [RESCUE] mode to fix it ;-) Appendix A: partitions and LVM2: Code:
# Clear the master boot record and partition table, just in case: Appendix B: tagfiles, virtual machine: For tagfile generation I used Alien's tagfile_generator.sh. First, I installed and tested my selection of packages under QEMU. Then I used tagfile_generator.sh to generate tagfiles, that I later scp'ed to the server and used them to perform the installation. QEMU is worth mentioning here for another reason. It allowed me to easily test the installation and configuration before doing anything on the remote server. Things like LVM2, syslinux or serial console were first made to work and tested within QEMU and later on transplanted onto the remote server. Please let me know if you find errors or inconsistency. I will edit the post to correct for possible mistakes. -- Best regards, Andrzej Telszewski |
You could add this as a new HOWTO page to the Slackware Documentation Project you know.
|
Hi,
Quote:
-- Best regards, Andrzej Telszewski |
Hi,
My Dedibox's disk is failing and I'm moving to another machine. It's gonna be a good time to do the write up. -- Best regards, Andrzej Telszewski |
Hi,
Long overdue, but there you go ;-) Install Slackware on an online.net Dedibox BareMetal Server. -- Best regards, Andrzej Telszewski |
Hey atelszewski, I used your guide at https://docs.slackware.com/howtos:sl...remetal_server and wanted you to know that it worked for OVH servers as well with slackware-15.
Just a note. The new initrd.img of slackware-15.0 is not in gzip format anymore, so this step Quote:
Code:
wget https://slackware.osuosl.org/slackware64-15.0/isolinux/initrd.img |
All times are GMT -5. The time now is 03:07 AM. |