Install Slackware to a folder using chroot?
Is it possible to somehow install Slackware from DVD to a folder on hdd
somehow using chroot? I can say take a debian livecd, unsquashfs the filesystem, chroot into that folder and remaster it quickly Can I somehow do the same with Slackware? thx |
the slackwaretool installpkg has the option '--root' for this, so if you install the required package like that it will be close. but to start it you probably need to use bindmounts for stuff like sysfs, proc, and maybe dev.
I don't know there exists a tool for this. There are on the other hand diskimages for UML (user-mode-linux) that you could mount via the loop option and get the content of that one. Probably you need to avoid starting stuff like udev in the slackware system since the system that contains the chroot will already have this running. just my thoughts, I never tried to run slackware on another system in a chroot. |
OK
I may have some progress first; I copy data from Slack livecd to folder on hdd I have a full slackware install to sda1 and am gonna copy livecd to folder "minimal" on that hdd slackware partition gonna copy everything to /target/minimal mount partition example sda1 Code:
mount /dev/sda1 /target Code:
cp -R --preserve /bin /target/minimal Code:
mkdir -p /target/minimal/media Code:
mount --bind /dev/ /target/minimal/dev Code:
Xnest -ac :2 & any ideas? thx |
Quote:
|
chroot
I've installed slackware in a chroot before, but I went about it differently:
Instead of copying all the directories and making directories, I let installpkg do it... I just navigated to a directory containing the slackware sets, and then would use installpkg command: Code:
installpkg --root /chrootarget a/*.txz ap/*.txz d/*.txz k/*.txz l/*.txz n/*.txz x/*.txz xap/*.txz Sometimes I have some directories on their own partitions (I put /tmp, /var, and /home on their own partitions, because /tmp and /var grow with log files and data, and I don't want them to grow so much that there is no space left on my root partiton; and I keep /home separate so I can back up user data efficiently)... in this situation, I have to manually create /var, /tmp, and /home in the /chrootarget directory, and then manually mount the partitions on those directories before proceeding with the installpkg command. When installpkg is finished, I bind the system's running directories to their corresponding directories in the chroot with the mount command: mount -o bind /proc /chrootarget/proc mount -o bind /sys /chrootarget/sys mount -o bind /dev /chrootarget/dev After that I can chroot: chroot /chrootarget /bin/bash And I then do things like set root password, add users, setup permissions in /etc/group, configure xorg if necessary, etc. I have had to install slackware this way on devices with broken cd drives and other obstacles to standard installation, and in the end, I rebooted, and one of the rc scripts sets up the encryption keys for the first time. If you were never planning to boot the system into slackware, but always be running in chroot, then you might need to run what was in those rc scripts manually (i.e. ssh keygen, etc.) |
Yes.
Given the simplicity with which Slackware is built, the possibilities on how you may install are many. It shows why a Graphic installer and a fancy package manager would get in your way. |
Quote:
A few notes before you start a shell in the new chroot (by running "chroot /your_chroot bash -l" instead of actually booting onto your fresh install):
Eric |
Quote:
Code:
installpkg --root /chrootarget a/*.t?z ap/*.t?z d/*.t?z k/*.t?z l/*.t?z n/*.t?z x/*.t?z xap/*.t?z There are still few tgz packages in the installation directories. |
Exactly. The .tgz packages which would be missed by the original command, are essential to Slackware's proper functioning.
Eric |
All times are GMT -5. The time now is 08:22 PM. |