LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2014, 05:18 AM   #1
slaka
Member
 
Registered: Oct 2012
Distribution: Slackware 14.0 86x
Posts: 43

Rep: Reputation: Disabled
Installing Linux from another Linux


Hey,

I would like to have complete installation of Slackware 14.1 for chrooting purposes in one folder, /mnt/chroot-folder.

Problem is that only way I can see this can be done is by reinstalling Slackware into empty partition and 'cp -r' everything into that folder.

Also, why are these installers necessary? As far as I know linux is just obviously pile of files which are copied into destination partition during installation process. Why there is no standard slackware14.1-amd64.tar what you can just extract into desired partition/folder and instruct bootloader to boot from that partition and after booting up you can run standard 'firstrun-init.sh' to initialize all stuff you would init during install?

Only thing I can think isn't so good about this way of installing is that you can't select packages and you have to manually remove them.
 
Old 03-21-2014, 07:14 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You don't need the installer to create a Slackware chroot. All you need is the installpkg command.
I do it this way:
Code:
installpkg --root /mnt/chroot /path/to/Slackware/tree/slackware64/{a,ap,d,e,f,k,kde,l,n,t,tcl,x,xap,xfce,y}/*.t?z
Of course you will have to adapt that to your needs, for example replacing slackware64 with slackware if you install 32 bit and possibly using not all of the sets, like not having KDE in the chroot.

On Debian you would use debootstrap instead to install a minimal system from where you can build up the chroot using apt-get/aptitude.
I am pretty sure that similar techniques exist for RPM based distros, but that is beyond my knowledge.
 
Old 03-21-2014, 09:49 AM   #3
Yaro
Member
 
Registered: Nov 2008
Posts: 41

Rep: Reputation: 21
Quote:
Originally Posted by slaka View Post
Hey,

(snip)

Also, why are these installers necessary? As far as I know linux is just obviously pile of files which are copied into destination partition during installation process. Why there is no standard slackware14.1-amd64.tar what you can just extract into desired partition/folder and instruct bootloader to boot from that partition and after booting up you can run standard 'firstrun-init.sh' to initialize all stuff you would init during install?

(snip)
Because Linux installation is not just copying files from point A to point B. Though you don't need an installer per se for a Linux distribution, the installation of packages (Which is how most Linux distributions set up the files: Via the package manager.) is a major step. But you have a whole mess of things before and after this file copying is done for the system to actually work.

Generally there's preparing the disk, making sure the partitions are set up in a way resembling the final system, the system installing the packages via package manager, the system configuring those packages, configuring itself for the hardware/firmware it found on your system, then taking steps for the user to configure things only the user can know, such as the root password, whether the bootloader should be installed, time zone, etc. During one of these steps the system configures the fstab.

As you can see, copying files as the only install step just isn't sufficient to get a working Linux install. It wouldn't even boot and the system wouldn't even necessary show any signs it's THERE during bootup without configuration and other stages beyond simply copying files.
 
Old 03-21-2014, 10:08 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Yaro View Post
Because Linux installation is not just copying files from point A to point B. Though you don't need an installer per se for a Linux distribution, the installation of packages (Which is how most Linux distributions set up the files: Via the package manager.) is a major step. But you have a whole mess of things before and after this file copying is done for the system to actually work.

Generally there's preparing the disk, making sure the partitions are set up in a way resembling the final system, the system installing the packages via package manager, the system configuring those packages, configuring itself for the hardware/firmware it found on your system, then taking steps for the user to configure things only the user can know, such as the root password, whether the bootloader should be installed, time zone, etc. During one of these steps the system configures the fstab.

As you can see, copying files as the only install step just isn't sufficient to get a working Linux install. It wouldn't even boot and the system wouldn't even necessary show any signs it's THERE during bootup without configuration and other stages beyond simply copying files.
For a chroot most of these steps can be omitted. I use installpkg (and have use debootstrap) for chroots for quite some time, works fine.
 
Old 03-21-2014, 11:13 PM   #5
Yaro
Member
 
Registered: Nov 2008
Posts: 41

Rep: Reputation: 21
Quote:
Originally Posted by TobiSGD View Post
For a chroot most of these steps can be omitted. I use installpkg (and have use debootstrap) for chroots for quite some time, works fine.
I don't see how a chroot makes it so you don't configure/partition your system. Those steps are still necessary. An actual installer isn't needed, but I'm addressing the assertion that installing Linux is just copying files when there's partitioning/configuration that has to be done before it can even boot. Chroot doesn't omit that.
 
Old 03-22-2014, 10:33 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Yaro View Post
I don't see how a chroot makes it so you don't configure/partition your system. Those steps are still necessary. An actual installer isn't needed, but I'm addressing the assertion that installing Linux is just copying files when there's partitioning/configuration that has to be done before it can even boot. Chroot doesn't omit that.
For a chroot you don't need a separate partition, so that step can be omitted. Configuration of the installed chroot can usually be done pretty easy by copying over configuration files from the host system or just run the inbuilt configuration tools. Of course an installed chroot does need some configuration, for example to provide network access, but many steps can simply be omitted, for example creating an fstab file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing USB/Ethernet device in Linux DSL & Linux general tigertim71 Linux - Hardware 1 03-10-2009 03:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:14 PM.

Main Menu
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