How to install with custom partitioning (virtualbox) ???
-
- Offline
- 1 year 2 months ago
- 2015-03-16
Hi,
I tried to follow the wiki, but unfortunately there are some loose ends and I can not interpolate the right way to do it.
I would like to setup alpine with 4 different (virtual) harddisk in a virtualbox like this:
sda1 - root / sdb1 - swap sdc1 - /tmp sdd1 - /home
How can I do this?
I boot into the alpine-mini-3.1.2-x86_64.iso and create partitions with fdisk and they seem to be ok:
But then I can not mkfs.ext4 because the package is not installed. I try to install e2fsprog, but I get this error:
ERROR: unsatisfiable constraints: e2fsprog (missing): required by: world[e2fsprog]
I do not understand http://wiki.alpinelinux.org/wiki/Setting_up_disks_manually#Custom_partitioning - how exactly should I mount the partitions below / to get the result described above? Also the mount command does not work like expected here:
localhost:~# mount /dev/sdc1 /mnt/tmp mount: mounting /dev/sdc1 on /mnt/tmp failed: Invalid argument
Maybe my mount and fdisk knowledge is a little bit rusty, however it is not clear for me how to achieve the setup described above and in which order I have to execute the setup scripts. Should I first setup-alpine? Or first use fdisk and then call setup-disk /mnt and after this call setup-alpine?
What is the right order of commands to get alpine running with a setup like the one described above?
btw, I can not upload images... oh, yes, Drupal, you have to take some additional action to activate image uploading for users, but I do not remember what it was...
Thanks for your attention!
ALPINISTA
a) You must run setup-alpine before than setup-disk.
b)
You need a /boot partition---edited---c) If you use ext4, command is
make sure that /mnt/{boot,home,tmp} exist.
Thanks for the info, I will try again!
BTW it would be nice to mention in the wiki that setup-alpine must be executed before customizing hd install and that /boot is needed in every case!
have a nice day!
Sorry, I did not explain myself porperly.
A boot partition is not needed in every case. A root partition is the only needed.
I meant that setup-disk creates a root, boot and swap partitions by default.
You can use tmpfiles.d to make folders at boot time, same on OpenRC as systemd. That's what I would do with /tmp.
https://github.com/OpenRC/openrc/blob/master/init.d/tmpfiles.setup.in
I had trouble, too. After having read the documentation on custom partitioning, I could not seem to understand how to go about using custom partitioning with the Alpine installation methods. At some point, I stopped trying to work according to the documentation and fell back on what I already know how to do. The following steps document my success in getting custom partitioning to work well on two systems, one bare metal and one VMware Workstation 11, using LVM and EXT4. Maybe these procedures that I used might serve as hints to help you or others.
First, on release 3.2.3, I used
setup-alpine
, according to the installation instructions; and, I used thelvm
andsys
options to perform a default installation using an LVM and EXT4. (This creates an EXT4 boot partition on/dev/sda1
and the remainder partitioned for an LVM Physical partition. The LVM volume group has two logical volumes: one for swap and one for the root filesystem.)My objective was to separate the file systems this way:
To get the partitions the way I wanted them, I rebooted at the end of the installation, and then I booted again from the optical device. The rest of the process is below.
Add the software needed to work with LVM and Linux Extended file systems.
Activate the volume group and logical volumes.
I want to change the volume group name from
vg0
tovg
:I want to change the logical volume names:
I want to reduce the size of the logical volume, root, to 1 GB:
I want to create new logical volume for many file systems:
I want to use Extended 4 with the "small" target for file systems under 20 GB:
I want to use Extended 4 with the default target for file systems over 20 GB:
I want to describe these devices and file systems in
/etc/fstab
:I want to mount the root file system and make a directory to store the partition for srv:
I want preserve the files in var and make directories to store the var, log, and audit volumes:
I want to make a directory to store the pgsql volume:
I want to mount the tmp volume to change permissions:
Using
vi /mnt/etc/fstab
, I want to replace UUIDs with device names, add volumes, and define my options:The mount options do not apply to every use case, of course. Unmount all file systems mounted under
/mnt
, and reboot.The manual partition configuration documentation is awful, as is the documentation for setting up a dual-boot configuration (it doesn't even address dual-booting with Windows, a common scenario; it assumes Ubuntu as the 'other' system and it assumes that system provides the boot-loader). I think the Alpine developers need to take a lesson from the OpenBSD project, which puts a lot of effort into documentation. The Alpine documentation is barely usable in some cases, completely useless in others. Clearly some real thought and effort has gone into building this system by smart people, but their work is for naught in many cases if not supported by minimally adequate documentation.
Unfortunately I agree with DonAllen, and he expresses the number one reason I don't push forward with many linux / BSD distros. If the documentation is not excellent, experimenting is not facilitated, and progress often founders. The great documentation of OpenBSD and Debian are a large part of the reason they are my top 2 fav distros.
@drdavid -- I, too, am a fan of OpenBSD for similar reasons -- the documentation is excellent, the system is rock solid, and I appreciate the attention they pay to security. Linus Torvalds is a smart guy, but I think he's wrong on the question of security. He seems to think of it only in terms of bug-fixing, which is clearly not correct. There are pro-active things that can be done to thwart attacks that are in OpenBSD and the grsecurity kernel. The latter shouldn't be necessary, but it is, because Torvalds gives security short shrift. OpenBSD does have its problems. The performance is not nearly as good as that of Linux, especially on multiprocessor machines, which is almost all of them these days. Their support for peripherals is not nearly as wide as Linux's. If you run the stable version, the packages tend to be old.
On the Alpine front, I'm beginning to doubt how they do QA, in addition to what I've already said about the documentation. Attempts to install 3.3.0 and 3.3.1 ended in failure on a couple of machines that were running the previous version. I've given up trying to use this system -- too many problems.
But if you decide to press ahead, I made some notes about installing with custom partitioning. Here they are:
1. Set up the partitions and create file-systems and swap (mkswap, swapon) with some external tool, such as GParted.
2. Boot the Alpine install disk.
3. Run setup-alpine -q. Note that if you are doing this on a laptop and have wpa-secured wireless, the script does not deal with wireless security. Useless. But you need network access during the install, so do the install with an ethernet cable stuck in the machine and set up that interface.
3. Run the setup scripts that are not run by setup-alpine -q. See http://wiki.alpinelinux.org/wiki/Alpine_setup_scripts
4. Mount the root filesystem on /mnt and create directories for the others. Mount them, too.
5. Run setup-disk /mnt
6. It is a mystery what setup-disk does with the MBR. Sometimes the system is bootable after an Alpine install, sometimes it's not. If you need a good boot-loaders, try GAG. It's very easy to install and works fine. Alpine does consistently lead what is necessary for chain-loading in the PBR of the /boot partition, so GAG will be happy. And GAG will make it easy to setup a multi-boot machine.
/Don Allen