You are not logged in.

#1 2013-06-19 03:07:32

keityo
Member
Registered: 2013-06-19
Posts: 6

Question about wiki instruction

I'm planning on installing Arch to a USB.  I'm following this guide.  I'm going to use method #2. 

Regarding ''CHROOT_DIR=archinstall-chroot Must Change First, or you might ruin your /etc/", I am not so sure what to change CHROOT_DIR to.  Could anyone help me out?  Thanks!

Offline

#2 2013-06-19 03:23:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Question about wiki instruction

Looks to me like it's to wherever you're creating the chroot.

Last edited by Scimmia (2013-06-19 03:24:13)

Offline

#3 2013-06-19 03:35:02

keityo
Member
Registered: 2013-06-19
Posts: 6

Re: Question about wiki instruction

Thanks!  So I can set CHROOT_DIR=blah, and it will make a directory called blah?  Would you recommend I put this in the home directory?

Offline

#4 2013-06-19 03:50:53

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

keityo wrote:

Thanks!  So I can set CHROOT_DIR=blah, and it will make a directory called blah?  Would you recommend I put this in the home directory?

I am not quite sure what you are saying here.  But without reading the article through again (I read it long ago), I would assume by the variable name that it is intended to be the directory where you are mounting the new system.  For example if you are installing to /dev/sdb3 and /dev/sdb3 is mounted at /mnt/usb, you would do "CHROOT_DIR=/mnt/usb".

If you are working in more than one terminal, you probably want to export it as well (ie. "export CHROOT_DIR=/mnt/usb") so that the varibale will exist across all shells.  The reason it might ruin your installation's /etc is because during the chroot, you make changes to files in /etc, so if the variable is not set, you may just end up right back in the running system instead of the intended new installation.

Offline

#5 2013-06-19 11:53:52

keityo
Member
Registered: 2013-06-19
Posts: 6

Re: Question about wiki instruction

Cool, thanks!  So I can choose where to mount /dev/sdb3 (ie. it is not automatically mounted like /mnt/sdb3)?  The warning about ruining my /etc has made me a little more cautious.

Offline

#6 2013-06-19 14:59:53

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

Well, you should be cautious about installation in general.  It is a time when you enter the terminal and elevate your permissions to superuser.  So a typo in just the right way has the potential to destroy your system.  When you are root (superuser) the system does not question what you are trying to do.  So for example, if intend to dd /dev/zero to a partition, but accidently do it to the partition you are running off of... it'll do it.  Or at least it will start to do it, I'm not sure how far it can actually get before the system actually goes down, nor do I really want to try.

The partition will not be automatially mounted to /dev/sdb3 unless you have something that handles automounting.  Many distributions include these, but whay you are using is somewhat dependent on the distribution you are using and the desktop environment that is installed as well.  For example, gnome uses gvfs I think, which utilizes udisks2.  I would recommend shutting off automounting while you do this, and mount all things manually. If your system has a separate /boot for example, you are probably going to want to put that on ${CHROOT_DIR}/boot and not where the automounter wants to put it.

Offline

#7 2013-06-19 15:08:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: Question about wiki instruction

WW, you really shouldn't reply without at least glancing at the article in question.

It specifically says that this script does not install to your final installation, it only provides a chroot for you to do the install from. You do NOT point it to where the new system should be.

Offline

#8 2013-06-19 15:11:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

Hmmm... yeah, I probably should have reread that.  I had used it a while ago, so I thought that I was remembering it correctly... apparently not even close.  Sorry thread.  I made a terrible mistake.

Offline

#9 2013-06-20 00:11:49

keityo
Member
Registered: 2013-06-19
Posts: 6

Re: Question about wiki instruction

So what would an appropriate value for CHROOT_DIR, and why?

Offline

#10 2013-06-20 00:17:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: Question about wiki instruction

Warning: this is a non-answer. It is an expression of sympathetic puzzlement and offers no useful recommendation whatsoever. Except that I would wait until somebody other than me suggests something. [Given that I'm not suggesting anything, you can't really do otherwise.]

keityo wrote:

So what would an appropriate value for CHROOT_DIR, and why?

I was wondering that. Looking at the script, I cannot see why that warning is there or what it is telling people to do or to avoid. The only issue I can see would be if you already had a non-empty directory named archinstall-chroot. Even then, I don't really see how it would mess up /etc.

So I am puzzled and cannot see what might be an appropriate answer since, as far as I can tell, the original value should be perfectly fine.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2013-06-20 01:07:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

From reading through that section, it would seem that the script will create a simple arch linux installation in which you can chroot.  You are then supposed to mount the new partitions you intend to install to from that chroot (or from the primary system and attach it to the chroot).  The added/simple arch installation will also have the arch-install-scipts, so presumably you should have all the tools necessary to follow the beginners guide.

Honestly, I think you should just boot from a live media and install that way.  You are just over-complicating the situation here.  You are baciaslly installing Arch Linux so that you can install Arch Linux.  If you cannot make a live media for whatever reason, the idea of chrooting into the mounted archiso seems much more sane to me than doing it this way.

The intructions on this page have slimmed up a bit.  When I used this, the AIF was still in place, so the insttructions used to basically go through everything that is now in the beginners guide.  In those instructions they suggested creating a variable for where your intended installation would be mounted (a la LFS).  This is what I was thinking the variable was referring to.  Sorry about that.  Scimmia was right, I should have taken a look at this before responding.

Offline

#12 2013-06-20 01:19:45

keityo
Member
Registered: 2013-06-19
Posts: 6

Re: Question about wiki instruction

My original plan was to install Arch to a USB stick with persistence, using this guide, which referred me to the guide in the original post.

Offline

#13 2013-06-20 01:30:37

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

Do you have two usb sticks?  Boot from one and install to the other.  Otherwise, I would recommend the first of those instructions you in the Install from Existing Linux page, where you chroot to the loop mounted live media.

As a side note, I would just like to point out that installing to a usb flash drive is not the best thing to do.  It will surely work, but the I/O of a flash drive is just super slow, so you will probably not at all be satisfied with the performance of the thing.  It will likely just totally bog down your machine whenever you have something that is making any small amount of writes.  I guess that is, unless you have USB 3.0 with a pretty fast flash drive.  I have a flash drive that peaks at ~90-100MB/s write, but my system refuses to boot from it and actually locks up the POST until I unplug it.  I would imagine that it would run pretty well on that (similar in speed to a normal HDD), but I can't really say for sure.

Offline

#14 2013-06-20 01:45:33

keityo
Member
Registered: 2013-06-19
Posts: 6

Re: Question about wiki instruction

I was planning on loading the os into a ramfs/tempfs, and making periodic backups.  I do have two usb sticks, so I'll try that out.  This is the guide you were referring to, right?

I'm just trying to play around / learn more about linux, so I think installing to a USB would be a good idea.  Also, my PC came with 4 primary partitions (system, C:, recovery, and HP tools), so I'm not so sure how to partition my system.

Offline

#15 2013-06-20 02:19:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Question about wiki instruction

I assume that when you say that it came with four primary partitions, you are sure that it is booting via bios mode and is formatted with MBR partitioning?  Because if it is GPT, then windows is booting via UEFI, and GPT can hold up to 128 primary partitions by default (this can be changed at the time you create the partition table).

That is indeed the guide I was referring to.  Though if you are going to use UEFI, creating a UEFI bootable installer is a bit different than a simple dd.  Whatever you do, don't use unetbootin, as it is not worth the trouble.

If you want to learn about Linux, and are aftraid to go about removing partitions, I would recommend using virtualbox instead.  It is very free, and it works quite well, and is fairly user friendly.  There are other virtualization options out there, but virtualbox tends to be the choice of Linux users since it is open source (or at least there is an open source version).  This way you can also still have a running system to view the wiki off of as well, while you learn how to set up your system.  With a bare metal installation of any kind, you are going to have to start with terminal/tty, in which you can access the wiki and whatnot with things like elinks or w3m, but it will be text only.

I have never tried to make a system that gets loaded into RAM, so I am not sure about how to do this.  It sounds like you are new(ish) to linux.  I am not trying to discourage you, so don't take this that way, but maybe it might be better to start off with a simple normal installation before moving on to things like making a system that gets loaded into RAM.  That is learn about how the stuff works before moving to more advanced topics.  Also, if you are really really new to Linux, it might serve you better to start with a more user friendly distribution, where you can kind of get your feet wet before diving in to something like Arch Linux.  Arch Linux isn't all that hard, but it takes a strong desire to learn if you are totally new (or sometimes even a seasoned Linux user). 

Oh and regarding the four primary partitions, wth MBR partitioning, you do indeed get four primary partitions, but you can also have as many extended partitions as you want.  So if the recovery and hp tools partitions are important to you, you would want to figure out how to back those up, and then zap them from the HDD.  Then adjust the C: partition to allow the size of you desired Linux, and go from there.  Just don't remove the C: or the system partitions and you will keep a bootable windows inatllation.

Offline

Board footer

Powered by FluxBB