2 2

[alpine-devel] Re: [acf] How to install alpine on btrfs

Natanael Copa
Details
Message ID
<20110226155808.32ef06ce@alpinelinux.org>
Sender timestamp
1298735888
DKIM signature
missing
Download raw message
On Fri, 25 Feb 2011 08:10:03 +0100
"Wei Liang(David)" <weiliang@danfoss.com> wrote:

> Hi ,
> 	I want to install alpine to a very old computer using btrfs
> as a VOIP server. I have been searching the internet but no manual
> for Alpine linux. Is there any reference for this ?

There was a bug in btrfs(?) that caused apk-tools to think it was
running on tmpfs. This caused some problems. Might be fixed in 2.6.37
kernel.

Generally, you can mount your disk layout on a tmpdir and run
setup-disk /your/root/mount

Since I dont think the bootloader supports btrfs you'll need /boot on
ext3.

so if you have a small sda1 with ext3 and a big sda2 with btrfs you are
supposed to be able to do:

mount -t btrfs /dev/sda2 /mnt
mkdir /mnt/boot
mount -t ext3 /dev/sda1 /mnt/boot

setup-disk /mnt

but...
I'm not sure if that will work like that. You will also need to make
sure that the initrafms has the btrfs kernel module included and gets
loaded. So before you run setup-disk /mnt:

echo "kernel/fs/btrfs" > /etc/mkinitfs/modules.d/btrfs

# add btrfs to features in /etc/mkinitfs/mkinitfs.conf

then you run setup-disk /mnt

and after you mount it again and edit the extlinux.conf and add btrfs
to modules=....

Something like that.

Would be nice if you report any bugs if setup-disk fails and write a
howto on wiki if you get it running.

Thanks!

> 敬礼 | Med venlig hilsen | Best regards
> David Wei
> 



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Wei Liang(David)
Details
Message ID
<12E1BE9450B64247A164A199754D2F1F05B98C@DKDN01MX07.danfoss.net>
In-Reply-To
<20110226155808.32ef06ce@alpinelinux.org> (view parent)
Sender timestamp
1298950409
DKIM signature
missing
Download raw message
Hi Natanael,
	Thank you very much for the message. 
	What I just did is to install the btrfs-progs-0.19-r0.apk downloaded from "http://dl-3.alpinelinux.org/alpine/edge/x86/test" ,format my partition as btrfs and mount it under /mnt. I did do this "
echo "kernel/fs/btrfs" > /etc/mkinitfs/modules.d/btrfs
# add btrfs to features in /etc/mkinitfs/mkinitfs.conf
".

But when I type "setup-disk /mnt" ,I got " btrfs is not supported. Only ext2 and ext3 are supported". Does it mean that I need to update some package?
	Thank you very much again!

敬礼 | Med venlig hilsen | Best regards
David Wei


-----Original Message-----
From: Natanael Copa [mailto:ncopa@alpinelinux.org] 
Sent: 2011年2月26日 23:58
To: Wei Liang(David)
Cc: alpine-devel@lists.alpinelinux.org
Subject: [alpine-devel] Re: [acf] How to install alpine on btrfs

On Fri, 25 Feb 2011 08:10:03 +0100
"Wei Liang(David)" <weiliang@danfoss.com> wrote:

> Hi ,
> 	I want to install alpine to a very old computer using btrfs
> as a VOIP server. I have been searching the internet but no manual
> for Alpine linux. Is there any reference for this ?

There was a bug in btrfs(?) that caused apk-tools to think it was
running on tmpfs. This caused some problems. Might be fixed in 2.6.37
kernel.

Generally, you can mount your disk layout on a tmpdir and run
setup-disk /your/root/mount

Since I dont think the bootloader supports btrfs you'll need /boot on
ext3.

so if you have a small sda1 with ext3 and a big sda2 with btrfs you are
supposed to be able to do:

mount -t btrfs /dev/sda2 /mnt
mkdir /mnt/boot
mount -t ext3 /dev/sda1 /mnt/boot

setup-disk /mnt

but...
I'm not sure if that will work like that. You will also need to make
sure that the initrafms has the btrfs kernel module included and gets
loaded. So before you run setup-disk /mnt:

echo "kernel/fs/btrfs" > /etc/mkinitfs/modules.d/btrfs

# add btrfs to features in /etc/mkinitfs/mkinitfs.conf

then you run setup-disk /mnt

and after you mount it again and edit the extlinux.conf and add btrfs
to modules=....

Something like that.

Would be nice if you report any bugs if setup-disk fails and write a
howto on wiki if you get it running.

Thanks!

> 敬礼 | Med venlig hilsen | Best regards
> David Wei
> 



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<6374029ac2c3fd835721a903cb41a18b@ytre.org>
In-Reply-To
<12E1BE9450B64247A164A199754D2F1F05B98C@DKDN01MX07.danfoss.net> (view parent)
Sender timestamp
1298981489
DKIM signature
missing
Download raw message
 On Tue, 1 Mar 2011 04:33:29 +0100, Wei Liang(David) wrote:

> Hi Natanael,
> Thank you very much for the message.
> What I just did is to install the btrfs-progs-0.19-r0.apk downloaded
> from "http://dl-3.alpinelinux.org/alpine/edge/x86/test [1]" ,format 
> my
> partition as btrfs and mount it under /mnt. I did do this "
> echo "kernel/fs/btrfs" > /etc/mkinitfs/modules.d/btrfs
> # add btrfs to features in /etc/mkinitfs/mkinitfs.conf
> ".
>
> But when I type "setup-disk /mnt" ,I got " btrfs is not supported. 
> Only
> ext2 and ext3 are supported". Does it mean that I need to update some
> package?
> Thank you very much again!

 Yes. you will need alpine-conf-2.6 (which is not yet released). You can 
 easily grab it from git though:

 wget 
 http://git.alpinelinux.org/cgit/alpine-conf.git/plain/setup-disk.in

 sh setup-disk.in /mnt

 That said, I also found out that the crc32c kernel module needs to be 
 in the initramfs module. I think its not a dependency due to there are 2 
 ifferent crc32c modules (crc32c and crc32c-intel) where -intel variant 
 is available when sse4 is enabled.

 So to conclude:

 # boot up 2.1.4 iso

 # config basics
 setup-alpine

 # add edge repos
 echo "http://nl.alpinelinux.org/alpine/edge/main" > 
 /etc/apk/repositories
 echo "http://nl.alpinelinux.org/alpine/edge/testing" > 
 /etc/apk/repositories

 # upgrade (you might need do an apk-tools workaround which I skip here)
 apk update
 apk upgrade

 # install needed tools. mkinitfs is for our config modification
 apk add mkinitfs e2fsprogs btrfs-progs

 # add btrfs modules to mkinitfs + needed crc32c
 echo "kernel/crypto/crc32c*" > /etc/mkinitfs/modules.d/btrfs
 echo "kernel/fs/btrfs" >> /etc/mkinitfs/modules.d/btrfs

 # create partitions (mark sda1 as bootable)
 # in this example I have sda1=/boot, sda2=swap and sda3=/
 fdisk /dev/sda

 # create filesystems
 mkfs.ext3 /dev/sda1
 mkswap /dev/sda2
 mkfs.btrfs /dev/sda3

 # mount filesystems
 mount -t btrfs /dev/sda3 /mnt
 mkdir /mnt/boot
 mount -t ext3 /mnt/boot

 # get latest setup-disk from git:
 wget 
 http://git.alpinelinux.org/cgit/alpine-conf.git/plain/setup-disk.in

 # install system on mounted /mnt
 sh setup-disk.in -v /mnt

 # umount and reboot. remove cdrom
 umount /mnt/boot /mnt
 reboot


 I will add btrfs support to mkinitfs and release alpine-conf (with the 
 mentioned setup-disk) asap.

 btw, I think putting / on lvm should work too.

 Thanks!

 -nc




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---