linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: How important is the MBR partition offset of grub-mkrescue ?
Date: Mon, 04 Nov 2013 15:44:59 +0000	[thread overview]
Message-ID: <21553651357127206522@scdbackup.webframe.org> (raw)
In-Reply-To: <20131104160843.5c0cabd2@opensuse.site>

Hi,

Andrey Borzenkov wrote:
> I confirm this. The culprit is this rule in 60-persistent-storage.rules:
> 
> # for partitions import parent information
> ENV{DEVTYPE}="partition", IMPORT{parent}="ID_*"
> 
> I'm not really sure how exactly to fix it. I.e. normally it is assumed
> that device is either partitioned or not. Situation when we have
> filesystem on a whole disk *and* individual partitions ... not sure.
> 
> I'm interested in which information actually needs to be imported from
> parent. May be it should be less aggressive.

Background:
I started this discussion on grub-devel because the problem
shows up with bootable ISO 9660 images produced by grub-mkrescue.

These images are suitable for booting from CD/DVD and from
USB stick. They begin by an MBR which marks a single partition
beginning at LBA 1. The ISO filesystem has to begin at LBA 0,
because else it would not be bootable from CD/DVD.
So the partition is not mountable, intentionally. It just protects
the ISO filesystem from partition editors and alike, but leaves
the MBR unclaimed in order to please some boot firmware.

Nevertheless the partition shows up as link in /dev/disk/by-label
under the name of the ISO filesystem Volume Id.

After Andrey Borzenkov pointed me to IMPORT{parent}, i added
statements to reset the blkid ID_FS_* properties:

ENV{DEVTYPE}="partition",              IMPORT{parent}="ID_*", \
        ENV{ID_FS_LABEL}="" , ENV{ID_FS_LABEL_ENC}="" , \
        ENV{ID_FS_TYPE}="" , ENV{ID_FS_USAGE}=""

I hope this is not a totally stupid beginner's mistake.
At least it solved the problem on my system.
Now the link points to /dev/sdb rather than to /dev/sdb1.

So i assume that before the change, the partition link overwrote
the disk link.


Have a nice day :)

Thomas


      reply	other threads:[~2013-11-04 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <52767048.9050902@gmail.com>
     [not found] ` <1974651407333528403@scdbackup.webframe.org>
2013-11-04 12:08   ` How important is the MBR partition offset of grub-mkrescue ? Andrey Borzenkov
2013-11-04 15:44     ` Thomas Schmitt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21553651357127206522@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).