2014-09-29

Custom Windows Installation, pt.1

First things first.

For whatever reason, my desktop isn't playing nice with VirtualBox -- every VM I try to start encounters kernel panics left and right.

Obviously this is a fantastic time to wipe everything and start from scratch.


But because just doing a simple reinstall isn't awesome enough, we obviously have to make a completely custom Windows installation!


For the duration, I'll be following the broad directions given in this Spiceworks article ...


So -- first things first ...

#0 -- The shape of things to come

The instructions linked above look awfully useful -- but what the Unprintable Hades do they mean?!?

  1. Prep your Windows Environment
    In other words: make sure that the software you have installed right now is what you want in your future custom installation.
    That's because (if my read is accurate) this process will basically take a snapshot of your current system -- at least with regard to installed programs, device drivers, etc.
    Bear in mind: this is a good opportunity to weed through all the cruft that normally accumulates -- one-off utilities that you never used again, Steam games that have so far failed to do anything more than take up space, ... y'know, cruft.
  2. Create WinPE boot-disk
    WinPE is the "Preinstallation Environment" -- the bare-bones version of Windows that loads off the CD when you're doing a fresh install.
    We want a stand-alone PE disk so that we can work on our current install -- say, to make an image-file of it -- without having it "on" at the same time.
  3. Clean the Environment
    We'll use the Automated Installation Kit (AIK) to wipe all personal- and verification-specific data from the environment. This will make it into a "general" installation. If we reboot into Windows at this time, we'll just have to re-enter all that verification stuff; but if we image it at this point, we'll have a general, machine-inspecific version of Windows!
  4. Reboot into WinPE and image the system!
    ...

    Yeah!
  5. Rip the Windows installation disk to ISO.
    To make a custom Windows installation, we need a regular Windows installation to mess with. This is pretty simple; we can use any old ISO-maker.
  6. Package the image into the Windows installation files.
    Finally, we take the image (a .WIM file -- Windows Image -- yuk yuk yuk ...) and stick it into the ISO we made in #5.

Sounds good.

What happens now? (Part 2, obviously ...)

2014-09-24

The Glorious Plan

At the very beginning of this blog, I promised you, my Adoring Public, a whole library of VM images, configurations, instructions, smarts, goodies, oodles, and whatchamacallits.

Unfortunately, my desktop scream-machine has decided that it no longer likes VMs, and has screaming fits whenever I try to instantiate them.

But a gentleman keeps his promises.
I'm not exactly sure how that applies to me, as I have neither a coat-of-arms nor any landed property -- but whatever.

So there's a bright side to all this: I get to tinker, and you get to watch me do it.

And have I got a plan for you!


Here it is, oh Adoring Public -- the Glorious Plan!

  1. Recreate the desktop in all its virginal glory -- make a fresh Windows 7 installation.
    ... but ...
    We'll customize the installation so all those useful little programs -- 7zip, TeraCopy, Steam, ... -- are included in the install!

    Which'll save time for what is truly important: Skittles(?!?) tacos and beer.

  2. Create a standard Archlinux VM image.

    Ideally, having a standard image will let us rapidly deploy a whole constellation of VMs, and give us more time for important stuff: playing with weird network configurations.

  3. Scrap my existing server, and use the Windows desktop / VM-constellation as the server.

    This'll entail a couple of other things:
    1. Relocate the desktop to a back room (to be out-of-sight, &c.)

      (Especially pertinent as my five-month-old daughter grows up and learns all about pouring juice into things, followed shortly by learning all about the joy of putting out electrical fires ...)
    2. Put in a lot more storage.
      My desktop has a cool terabyte. Which is awesome for Steam gaming. And lousy for a NAS.
      I want to store my entire music collection! And all my DVDs! And every crappy picture of every middling dessert I've ever looked at!
      And that means I'll need as much storage as I can get -- at least another terabyte.
    3. Install another Network Interface Card.
      Right now the desktop has an NIC built into the motherboard, which is great.

      But we want this machine to eventually provide services to the entire network -- which includes a firewall. And our firewall won't amount to a hill of beans carrots if it can be bypassed. We need to make sure that all network traffic needs to go through the firewall.

  4. ?????

  5. Profit!

Up next: How I Learned to Windows (And So Can You!)

Interlude - Windows Wirtualization Woes

This series on creating a base Archlinux VM image has been awesome. As often as I've done an Arch install before, I've still learned a lot from writing the series.
They say that you never actually know something until you can teach it back; and writing about something -- say, choosing the best file-system -- has forced me to revisit all sorts of topics I had previously learned "just enough" about.


Anyway -- I had quite literally gotten to the last post in this series -- when my VirtualBox broke.

Or my Windows broke.

Or something broke -- I don't know which. Anyway, my VirtualBox doesn't work anymore.

(If I try to start an x64 VM, the "loading" message sticks around like a lazy child who won't move out of your basement. And I can't even load a 32-bit VM without getting "virtual kernal panic OMGeeeeeeee!!!!!!1" messages.)


I've tried re-creating the VM from scratch, I've tried the re-install cycle a dozen times, I've tried mucking around in the registry, -- no joy.


So -- unfortunately -- I haven't been able to get around to uploading this work-in-process VM image to Dropbox yet. It's still infuriatingly DIY.

On the other hand, it has given me a whole slew of ideas on how to Make My Stuff Better.
I'm thinking: 
  • consolidate my antique server-box into my (high-power) desktop as a VM,
  • split my monolithic server into a fleet of VMs dedicated to particular services,
  • finagle my desktop's network to pass through my firewall VM, 
  • ...

This and more coming up! Stay tuned!

Interlude - Absolutely Brilliant Punking and an Occasion for Nail-Biting

I know, I know -- I promised you some glowing glosses on the Glorious Plan.


But first -- humor -- via this absolutely brilliant piece of network hacking by Peter Stevens at ex-parrot.com ...

My neighbours are stealing my wireless internet access. I could encrypt it or alternately I could have fun.
...

Pete then shows how all "unknown" network traffic -- i.e., from any device he hasn't specifically told his server about -- can be automatically redirected.

His router-server can intercept every HTTP request that passes through it, and his firewall can be configured to do things to the requests/responses:

  • either force the Wifi-poacher to vote abou kitten pictures eternally, or ...
  • dynamically intercept all inbound images, flip them, and seamlessly insert them back ...



All of which is absolutely hilarious. (And if you don't think so, then you're a Godless Un-American Communist Reprobate. So there.)


But -- in all seriousness -- this also illustrates how important Internet Showers are.
Yeah, the "correct" term is Internet Hygiene -- which makes me think of formaldehyde, powdered latex, and Clorox -- hence the not-quite-so-stupid neologism.


  • The more hair-raising attack described here -- the image-flipper -- is a kind of Man-in-the-Middle (MITM) attack. It's most often used to impersonate legit sites -- say, to give you a fake bank website -- to steal your log-in.

    So far as I know, this is entirely preventable by using SSL -- or, the 's' in https. That causes the connection to be encrypted from start-to-finish, with (practically) unbreakable encryption and authentication.

    Caveat: most of the time, your browser will download resources -- images, scripts, etc. -- via plain-old HTTP, without using SSL. This is because most high-demand sites -- like eBay -- would prefer to avoid the overhead of using SSL for every single image requested.

    So, the image-flipper would be able to substitute images just fine, so long as they weren't delivered over SSL.
    Hey, everything's a trade-off.
  • Note on the above: Of course, it's still entirely possible to put yourself into a vulnerable position when using SSL. The trick comes from the way SSL works -- by exchanging certificates.
    Ordinarily, your browser and the end-server each exchange certificates -- i.e., identifiers with strong cryptographic properties that unique identify the bearers.

    Via the use of strong math-fu, the two end-points can use these certificates communicate securely, each confident that what they receive is what the other actually sent.

    And most of the time, proxy servers are polite enough to respect this. A well-mannered proxy will handle only unsecured, plain-old HTTP traffic.

    Of course, every so often -- especially behind university or corporate firewalls -- the resident proxy server insists on handling everything that passes through it. In that case, a couple of things will happen:
    • The proxy will intercept your request to the end-server, and its response to you. It'll store both your SSL certificates. In the process, the proxy will create its own SSL certificate.
    • From then on, the proxy will use its own certificate whenever it relays messages between you and the end-server.

      You can tell when this is happening, as your browser will give you a big warning message:


    • When this happens -- I'm half-ashamed to say that I usually just acquiesce with it out of lethargy -- "who has time to complain about this", etc., etc.

      But it's something to keep in mind.

2014-09-22

Archlinux VM -- Part the Seventh -- Action!

Right -- we're in the home stretch. We've gone from formatting the base hard-disk, to installing all teh fiels, to making last-minute configurations. We're ready to boot into our new system (and switch on one or two more things that have to wait 'til then.)


Due to several factors still to be explained, I won't be able to give you any new pretty pictures to go along with my rambling remarks.


Be that as it may ...


In Part Six, we finalized the last configurations for our system-to-be.


We're all set to reboot and run our very first smoke-test!

If you're still in your chroot sub-shell -- i.e., if you're still in Nasty-Prompt Ugly-Land -- snap out of it!
exit
Then -- reboot.
reboot
Ta-da!


[several seconds later ...]


Once the temporary system actually logs off and the VM reboots, you'll probably see the CD-prompt you saw earlier -- with a pretty logo and everything. Choose to "Boot existing operating system" whenever you have the chance.

You'll see a much-uglier boot-prompt -- no logos, no pictures, just colored text.

("What, you mean people actually lived like this?")
(Boy, we were excited to get CGA, and that was 4 colors max ...)
("Grandpa, you crazy ...")

Anyway, choose the regular Archlinux installation. ("Fallback" is another story for another time.)


You should see a slew of boot-messages appear as different modules come on-line.


After an eternity of maybe five seconds (!!!), you'll see the login prompt. (It'll say "Login:")

Log in as root.

There will be no password, too, as we didn't bother to set one during our final set-up phase.


And you're in! Hooray!

There's only one piece of configuration you should do, which we couldn't do beforehand: you'll need to enable the network controller.

If you remember, we configured a new network profile, ethernet-dhcp, back in Part Six. We couldn't activate it yet, though, as the networking sub-system wasn't actually running yet.

So: activate that shiz!
netctl start ethernet-dhcp

The command will probably take a second or two to complete, as your VM talks to the network, gets itself an IP address, and all that.

Once it finishes: verify that the network really is working:
ping google.com

 You should see those ping messages start piling up. Hit [Ctrl+C] to abort the command once you've see enough.

Now, you just need to make sure that that network-profile will activate automatically in the future.
netctl enable ethernet-dhcp


And that's the end of that! We've got our very own Archlinux VM, completely base and "stock", which we can clone and re-use to our hearts' collective content!


I'll have that VM image for you shortly -- albeit with a couple of caveats. But that'll come in the Final Countdown section ...

2014-09-17

Archlinux VM -- Part the Sixth -- Big Breath Before the Plunge

We left off in Part Five having just finished getting ALL TEH FIELS for our new Arch system.


Good news is, we're almost done!

Bad news is, we're not done.

As mentioned before, we still have a couple of things to do:
  1. Tell Arch how to mount our drives automatically at boot-time -- just like what we did manually in Part Four
  2. Set up the VM's hostname (i.e., "what do other systems call this one?") and timezone (so as to read the system clock properly)
  3. Make sure that the new system will be able to connect to the Internet when we turn it on.
  4. Configure the bootloader, so the computer can find the operating-system at all.
  5. Create the "RAM-disk", so the bootloader can have something to load right away.

#1 -- Mounting drives automatically

We had to mount each of our partitions manually back in Part Four. Each time, we executed the mount command followed by some parameters -- the device name ("/dev/sda7"), the destination ("/mnt/var") -- and we could have put some options, too, if we'd wanted.

Well, Arch has a way to automate this process every boot-time. It involves creating a file, fstab ("file-system-table" -- get it????), which contains all the options and parameters we would otherwise have to give to mount by hand.

Furthermore, Arch has a way of doing this basically automatically.

Execute:
genfstab /mnt -U

Bedad, Louise, whass'possa mean???

genfstab generates an fstab for us. In this case, it looks for all drives mounted under /mnt, and includes only those (besides any non-mountable drives, like our swap partition).

The final -U means "include drive UUIDs, just in case we want them". (This can be useful, as the /dev/... device-name can change in certain situations -- in which case our fstab wouldn't work any longer! The UUID, on the other hand, is an ID that's "hardwired" into the drive itself, and can't change nearly so easily.)


Of course, this command just spits out what the fstab would be. It's up to us to save it.

And that's almost as easy.
Execute:
genfstab /mnt -U > /mnt/etc/fstab


This just does the same thing, except that we take the output of genfstab and redirect it to a file -- in this case, /mnt/etc/fstab

And, yes, the fstab needs to be put inside /etc. It's standard, it's expected, and it'll basically make everything you love go up in flames if you don't put it there.

Cool!

But there's one thing we still need to do. Our fstab is complete -- except for a /tmp partition.

The hell do I care for, you say?

Because you absolutely need a /tmp partition.

/tmp is used to hold really, really temporary files -- stuff you don't want to last through the next reboot. That's why we didn't make a hard-disk partition for it like we did for /var.

And that's why we'll make our /tmp partition be entirely in RAM as a tmpfs.

We'll need to add a few lines to our new fstab.
So, execute:
nano /mnt/etc/fstab

Move the cursor down to the very end of the file, and add these new lines:


Cool. Save and exit the file by typing: [Ctrl+X] [y] [Enter]

And that's it for the fstab.

#2 -- Setting the hostname and timezone

The hostname is the name this system will answer to on our local network. So, you should choose a name that'll be unique, catchy, memorable.

You should totally choose "snowjakatron".

Anyway: choose yourself a hostname, and then execute:
echo snowjakatron > /mnt/etc/hostname
(or whatever other hostname you chose)


Now for the timezone.

You need to represent the system's timezone by creating a symlink -- a symbolic link, a pointer that looks like a file -- to a particular zone-file.

There are a lot of zone-files -- and this would be a lot harder without Arch's auto-complete!

Yeah, maybe I should have said something about that sooner.

See, Arch -- well, the shell that Arch uses (NERRRDDD) -- attempts to auto-complete whatever you're typing when you hit [Tab]. If there's more than one possibility, hitting [Tab] [Tab] will show you all available auto-completions.

So: start typing:
ln -s /mnt/usr/share/zoneinfo[Tab]

Easy-peasy. You can type a little more, hit [Tab], backspace a bit, hit [Tab] again, ...

Then just proceed along until you come to a good match for your current time-zone.
For example, linking to my time-zone looks like:

Then, just create the link and be done with it.


And that's the end of that.

#3 -- Configure the network-to-be

Out of the box, Arch uses a program called netctl to ... well, control networks. It makes a simple job of giving us control over individual network interfaces (in case you have more than one, like a NERRRRRRDDDDD), and is pretty easy to set up.


But before we make any changes -- the basics of network configuration.

There are two basic ways to configure your network:
  1. The easy way -- everything is auto-configured
  2. The custom way -- manual everything

Most of the time, you can get by perfectly well with the easy way. This means that the Arch system will talk to something else -- say, your router -- for an address, the best way to get to the Internet, and a few other details. This is just right for most things.

You'll want a custom configuration if you need something special -- say, a server whose address never changes.

But this is our first set-up, and we want to stick with simple for now. We'll go with auto-config.

Let's use one of the pre-configured netctl profiles.
Execute:
cd /mnt/etc/netctlcp examples/ethernet-dhcp ./


(This changes focus to the netctl directory, and then copies one of the pre-config'd configs into it -- thus making it available to use.)

We'll want to make sure that this netctl profile will activate our network interface properly. So we need to know the device-name of the network interface.
ip link

You'll see (at least) two interfaces:
  • lo -- the "loopback" interface -- represents this system. Anything we send down it, we immediately get back.
  • enp0s3 -- an Ethernet interface -- actually, Arch can name this whatever; but, in my experience, these are usually either enp0s3 or enp0s8

Of course, if you configured your VM with more than one VNIC ["virtual network interface card"], you'll see more than one enp... -- in which case, you need to do some detective work to figure out which is which ... But that's another story for another time!


So we know the name of our NIC! Let's edit that netctl profile!
nano ethernet-dhcp


Edit the line beginning with "Interface=...", so that it has the device-name we discovered earlier:

Everything else is fine -- leave it alone.
Type [Ctrl+X] [y] [Enter] to save your changes and exit.

And that ... should be that.

#4 -- Set up the bootloader

The bootloader is responsible for finding the operating-system right when the system powers on. It can give the user a menu --say, if you wanted to "dual-boot" Linux and Windows. And without it, the system simply won't work at all -- there'd be no connection between "turning the power on" and "this program-file getting loaded into memory".


First of all, you'll want to change your focus, from the temporary Arch we're running off the CD, to the system-in-progress that we're building. (We want to install Syslinux onto the in-progress system, not the temporary one!)
arch-chroot /mnt


You'll notice that immediately it looks ... stupider. Less colorful. Less friendly.

chroot means "change root". It says, "spawn a new sub-shell, and treat /mnt as our new /". And it looks ugly because it's using a very, very basic shell -- more primitive than the one that Arch launches by default.

Anyway: you've changed root. Fortunately, the Syslinux install script is pretty easy to run:
syslinux-install_update -i -a -m


The script copies a few files, sets up the "boot me!" flag on the right drive, and -- last of all -- points the Master-Boot-Record toward the Syslinux program.

Simple on the outside -- horribly complicated under the surface.

#5 -- Generate the "RAM-disk"

Once Syslinux actually executes, it in turn tries to load Arch -- or, at least, the core parts of Arch. What we want to do is bundle all those core parts together, to make it easier for Syslinux to load them all into memory upon boot-up.

The install-process we ran in Part Five should have given us all the right settings, at least for our simple set-up. So all we have to do is trigger said generation:
mkinitcpio -p linux
 Lots of things start happening.
Some modules are assembled ...

... and packaged and compressed ...

... and stored away.




And that's basically it. Our system is fully prepared, installed, and configured. We should be good to go to turn it on for the first time.

But that'll have to wait 'til Part Seven ...

Archlinux VM -- Part the Fifth -- Get ALL the Files!!!

In Part Four, we finished mounting the newly-formatted drives into the Arch directory-structure. That means that the (temporary) Arch system thinks that these different hard-disk partitions are part of itself!

Which means that we can install the operating-system.

Freakin' finally. Sheeze, Louize ...


Fortunately, Arch makes this step really simple -- if you have a working Internet connection. I'm assuming that you're reading this online, and following along in your own VM instance.

If you're reading from a dot-matrix printout while hacking your Dot-Com-Bubble-era laptop (and doubtlessly binge-drinking PBR and taking blurry pictures of your many scruffy hats), and eager to get to the bit where I explain how to set up your WiFi adapter ... I hate you. Go read about that yourself, you stupid hipster.


But for all you good people, here's what you do:

Execute: pacstrap /mnt base syslinux

Cool, cool -- but what does it mean?

  • pacstrap is the installation-script which automates Arch's package-manager
  • /mnt is the "installation root" -- the base-directory we want to install the new system into
  • base is the "base" package -- it has only the absolutely-necessary Arch system files
  • syslinux is the boot-loader package. There are a couple of available bootloaders, and I prefer to use Syslinux.


Enough questions -- execute that sucker!

After a bit, you'll see pacman starting to retrieve the most recent package-manifests from different servers.

There are over a dozen available mirrors for Arch packages, so don't panic if you get a time-out error (like you see here).
If you see a dozen time-outs in a row, then -- well, yes, then you've got a problem. Your Internet is down, or your connection is bad, or something.

Anyway -- after pacman downloads a copy of all three manifests, you'll see a list of all the packages you need.

You'll see a prompt -- pacman says, "jus' wan'ed to check wi' you fust, guv'nah."

And then pacman breezes right past you, the little [redacted by censor], and you'll see a wall-of-progress-bars as all the files download.



And ... that's a lot of file there.

Make a cup of coffee. Pour yourself a beer. (No, don't pour the beer into the coffee, what's wrong with you?!?) Kick back and read Jalopnik or something, I don't know.


Eventually pacman will finish downloading, and start installing ...
(Installing linux? Hooray, we're finished!)

Part of installing linux is "building the boot-image" -- essentially, the most critical bits of the operating-system that get loaded right after the computer is powered-on ...

Until finally ...
We're finished!

And that's the way you install an operating system.

Of course, we don't have a functioning system yet. We've got all the right files there, but they're not configured quite right just yet.

We'll still want to ...

  • Tell Arch how to mount our drives automatically at boot-time -- just like what we did manually in Part Four
  • Set up the VM's hostname (i.e., "what do other systems call this one?") and timezone (so as to read the system clock properly)
  • Make sure that the new system will be able to connect to the Internet when we turn it on.
  • Configure the bootloader, so the computer can find the operating-system at all.
  • Create the "RAM-disk", so the bootloader can have something to load right away.


But this'll all come in Part the Sixth ...

Archlinux VM -- Part the Fourth -- Mount Up

So, back in Part Three, we finished creating the several file-systems.



These will be the foundations on which we can build the final Arch system.

But right now, the partitioned, file-system'd drives are all still just that -- "devices". Arch just thinks about them as "things", not as "storage locations".

To have Arch make that conceptual leap, we need to mount them -- we'll have to tell Arch, "stick this drive into the directory-structure here".


So: to review our several partitions:
  • /dev/sda1 -- /boot -- ext3
  • /dev/sda5 -- (swap) -- swap
  • /dev/sda6 -- /home -- ext4
  • /dev/sda7 -- /     -- ext4
  • /dev/sda8 -- /var  -- Reiser-FS

Well, if you remember from Part Three, we already activated the swap partition (with swapon) -- so let's cross that out.
  • /dev/sda1 -- /boot -- ext3
  • /dev/sda5 -- (swap) -- swap
  • /dev/sda6 -- /home -- ext4
  • /dev/sda7 -- /     -- ext4
  • /dev/sda8 -- /var  -- Reiser-FS

Another thing to remember: /dev/sda7 is going to be root (/). This means that all other drives will be mounted 'inside' it -- well, inside its own directory structure. So: we need to mount this one first of all.

Now: we can't just mount /dev/sda7 into / right now -- after all, we're running Arch right now, off the CD! We'd just be replacing our filled-up directory-structure (from the CD) with an empty one (from the newly-formatted hard-disk).

The usual practice, when mounting "external" drives, is to put them under /mnt/ -- short for "mount" (get it?).

(Executing ls / lets you "list" all files and directories stored in root (/).)
As you can see, Arch comes with this location already made up, so we don't have to worry about that.


So: first things first: let's mount our soon-to-be root drive!
Execute: mount /dev/sda7 /mnt/

(I know what you're thinking, and this is exactly the opposite of a teenager: instant execution with no drama!)

Let's create mount-points and mount the remaining drives:

/dev/sda1 -- /boot

Execute:
  • mkdir /mnt/boot/
  • mount /dev/sda1 /mnt/boot/



/dev/sda6 -- /home

(Same as above, really.)

/dev/sda8 -- /var

(You's a smart guy, you's can figures it outs.)


So, cool! -- now our newly-partitioned and file-system'd drives are sitting pretty, virtually included in the temporary Arch system!

Now to actually install the operating-system files into that virtual location -- but that comes in Part Five ...

Archlinux VM -- Part the Third -- Making Filesystems (Like It's 1999)

In Part Two, we defined the five partitions for the VM's hard-disk.



Now we need to create the file-systems for each of these partitions.


A file-system, to be really, really general, is the particular way that files are organized on a partition. Each file-system, generally, tries to cater to a specific use-profile:


  • Some file-systems attempt to deliver the fastest read/write speeds possible
    For example: the Reiser-FS is optimized for dealing with lots of really tiny files
  • Other file-systems attempt to preserve data-integrity against sudden power-loss -- usually by maintaining a journal -- a record of "what I'm doing right now".


Read more -- more than you never knew you ever wanted to know -- about it on the Arch Wiki!


In an earlier post, we decided on the file-systems we'll be using:


  • /dev/sda1 -- /boot -- ext3
  • /dev/sda5 -- (swap) -- swap*
  • /dev/sda6 -- /home -- ext4
  • /dev/sda7 -- /     -- ext4
  • /dev/sda8 -- /var  -- Reiser-FS

* actually, the swap partition doesn't have much of a file-system -- just enough to support addressing extra RAM-pages. but we still need to create and activate it.


So -- after making sure that the partition table is written to the hard-disk, exit cfdisk.


Let's work down the list from the top: /dev/sda1

Make an ext3 file-system by executing: mkfs.ext3 /dev/sda1

You'll see an alert about a pre-existing partition table -- accept it ...

And just like that, it's done!

Like I said earlier -- ext3 is pretty simple to set up.


Moving on to the swap partition!
Execute: mkswap /dev/sda5

Again -- trivial.

While we're here, we might as well activate the swap partition, too! (Thus allowing Arch to use that hard-disk space for RAM swapping, should it prove necessary.)

So, execute: swapon /dev/sda5


We're just flying through this, ain't we?

On to /dev/sda6! Execute: mkfs.ext4 /dev/sda6

Cool. Do the same thing for /dev/sda7.


Four down, one to go!
We want to use a different file-system for this last partition.
Execute: mkfs.reiserfs /dev/sda8



The file-system program will give you a hilariously-overdramatic message about "DELTING ALL UR FILS". Smile, nod, and move along.

Well, that wasn't too bad.


So cool. We've created the file-systems for each of these partitions.

Now we need to "mount" them -- insert them as virtual directories into Arch's directory structure -- so we can install the system software.

But that'll have to wait 'til Part the Fourth.

2014-09-15

Archlinux VM -- Part the First -- Smoke Test

Assuming you have a VM set up to run Archlinux, as in Part Zero ...

#1 -- Initial Set-up

We need the latest Archlinux ISO.

Download it from the main Arch site. Pick a mirror to get it via HTTP -- or, be a champ and help torrent it (refer to the same page for details).

Here, I'll be getting it from some random mirror in les Etas Unis.

The resulting view might be intimidating, but you're a pro. Fear is the mind-killer. Fear is the little death, etc. etc. etc.

Select the .ISO and download it.


Oh, right. 574 MB. On my piddling DSL line.

Coffee break!

...

So you finally have a copy of the Archlinux distribution ISO.
You'll want to boot up the VM using the ISO.

So: open the VM's Settings, and view its "Storage" options.

You'll want to attach the ISO you downloaded as an CD Device underneath the IDE Controller.
(Under "Controller: IDE", select the little CD icon with the green +)



Behold!





Now it's time for the smoke-test -- start the VM.

After a few seconds, you should see the Arch CD boot menu:

Select which architecture is appropriate -- e.g., if you're running a 32-bit machine, start the "i686" version of Arch.

Colored text will flash by as various modules are loaded off of the CD. After a few seconds, you'll be automatically logged into the new (temporary) Arch system.


Of course, this system isn't installed anywhere except on the CD. You'll need to set up the hard disk, initialize the boot-loader, and install the operating system's files. But that'll come in Part the Second ...