Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1635732

Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs

From Alasdair G Kergon <agk@redhat.com>
Newsgroups linux.kernel
Subject Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs
Date 2017-05-04 15:30 +0200
Message-ID <tDoZr-3ZE-7@gated-at.bofh.it> (permalink)
References <txEue-8r4-23@gated-at.bofh.it> <txFgC-un-15@gated-at.bofh.it> <tDmXE-2GO-7@gated-at.bofh.it> <tDnTH-3io-5@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered in England and Wales, number 03798903. Registered Office: Peninsular House, 30-36 Monument Street, 4th Floor, London, England, EC3R 8NB.

Show all headers | View raw


Some more thoughts with your example, dmsetup might look like:

# dmsetup create --bootformat "lroot:uuid,rw,0 2097152 linear 8:2 0, \
2097152 2097152 linear 8:3 0, 4194304 2097152 linear 8:4 0"

- also supporting creating multiple devices if the semi-colon is used

- colon to separate name from uuid, like we already do major:minor 
- colon to separate other flags from rw if we need them in future

- splitting first on a unescaped semi-colons, then on the first two
unescaped commas, and then on unescaped commas and then unescaped spaces
within the table

- backslash escapes the following character so it is never a treated
as a separator
  - lroot\:uuid\;\\\ \"\, would be a device with no uuid and the name
    lroot:uuid;\ ",  (on a non-udev system without name mangling)

# dmsetup ls --bootformat lroot
dm="lroot:uuid,rw,0 2097152 linear 8:2 0, 2097152 2097152 \
linear 8:3 0, 4194304 2097152 linear 8:4 0"

# dmsetup ls --bootformat
(all devices on one output line)

While the code also supports devices in the /dev/sda2 format for 
convenience, please use the preferred 8:2 format in any implementation
and documented examples (to avoid the unnecessary dependency on /dev and
its dependencies).

Or with some alternative name for the option
--boot[format|param]
--short[format]
--kernelparam
--condensed
other suggestions?

dmsetup create --condensed
dmsetup ls --condensed

Alasdair

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs Enric Balletbo Serra <eballetbo@gmail.com> - 2017-05-04 13:20 +0200
  Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an         initramfs Alasdair G Kergon <agk@redhat.com> - 2017-05-04 14:20 +0200
    Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an         initramfs Alasdair G Kergon <agk@redhat.com> - 2017-05-04 15:30 +0200

csiph-web