X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from smtp.core-hosting.net (ns1.core-hosting.net [95.130.13.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 928B1DC0231 for ; Tue, 17 Mar 2015 06:36:28 +0000 (UTC) Received: from mail.core-hosting.net (unknown [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.core-hosting.net (Postfix) with ESMTPSA id D92D3AA12CF for ; Tue, 17 Mar 2015 07:36:26 +0100 (CET) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 17 Mar 2015 08:36:26 +0200 From: Olivier Mauras To: Subject: [alpine-devel] Re: [Patch] mkinitfs - Support for rootfstype and rootflags Reply-To: Mail-Reply-To: In-Reply-To: <20150316210825.12739794@ncopa-laptop> References: <20150316113651.52ba616b@ncopa-desktop.alpinelinux.org> <418ebc36905fc436a830d3d91870d204@core-hosting.net> <20150316161419.44a5f4a2@ncopa-desktop.alpinelinux.org> <20150316173947.GB13750@newbook> <20150316210825.12739794@ncopa-laptop> Message-ID: <8b211b9bb16c66629d70a8c0a21ba33e@core-hosting.net> X-Sender: olivier@mauras.ch User-Agent: Roundcube Webmail/0.7.2 Please find the update patch below: From acda031c6cc79f427b90d4395b95b3472b6c587d Mon Sep 17 00:00:00 2001 From: Olivier Mauras Date: Mon, 2 Mar 2015 11:30:17 +0100 Subject: Add support for two new options in the cmdline. - rootfstype: Let's you specify the type of filesystem for the root fs - rootflags: Let's you specify mount options for the root fs - If specified, "ro" flag won't be added by default This has primarily been setup to be able to boot Alpine guests from a 9P virtio share and make it easy to change mount options from libvirt/qemu diff --git a/initramfs-init.in b/initramfs-init.in index fd3e510..10116f9 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -387,8 +387,8 @@ eval set -- `cat /proc/cmdline` myopts="alpine_dev autodetect autoraid chart cryptroot cryptdm debug_init dma init_args keep_apk_new modules ovl_dev pkgs quiet root_size root - usbdelay ip alpine_repo apkovl alpine_start splash blacklist - overlaytmpfs" + rootfstype rootflags usbdelay ip alpine_repo apkovl alpine_start + splash blacklist overlaytmpfs" for opt; do case "$opt" in @@ -551,8 +551,20 @@ if [ -n "$KOPT_root" ]; then mount -t tmpfs root-tmpfs /media/root-rw mkdir -p /media/root-rw/work /media/root-rw/root mount -t overlay -o lowerdir=/media/root-ro,upperdir=/media/root-rw/root,workdir=/media/root-rw/work overlayfs $sysroot + elif [ -n $KOPT_rootfstype ]; then + if [ -n $KOPT_rootflags ]; then + rootflags="$KOPT_rootflags" + else + rootflags="ro" + fi + retry_mount -t $KOPT_rootfstype -o $rootflags $KOPT_root $sysroot 2>/dev/null else - retry_mount -o ro $KOPT_root $sysroot 2>/dev/null + if [ -n $KOPT_rootflags ]; then + rootflags="$KOPT_rootflags" + else + rootflags="ro" + fi + retry_mount -o $rootflags $KOPT_root $sysroot 2>/dev/null fi eend $? -- cgit v0.10.1 --- Direct link if needed http://git.mauras.ch/mkinitfs/patch/?id=acda031c6cc79f427b90d4395b95b3472b6c587d --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---