[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Finding the root device of a labeled partition
From: |
Simon Wydooghe |
Subject: |
Finding the root device of a labeled partition |
Date: |
Thu, 2 Jun 2016 13:34:24 +0200 |
Hi,
I have a specific problem I'm trying to solve. I'm trying to chainload the
MBR of a USB stick based on the label of one of the partitions on the USB
stick. I can search and set the root partition as follows:
search --set=root --label MYLABEL
This sets root to 'hd1,msdos3' for instance. However, I can't chainload
this because I need to chainload the device (hd1), not the partition
(hd1,msdos3).
So chainloader ($root)+1 will not work. Chainloader (hd1)+1 does work. So
my question is, how can I find the device automatically and assign it to a
variable? As this USB stick will be used on a variety of hardware, I can
never know in advance if it will be hd1, hd2, etc.
Thanks for any hints.
Best regards,
Simon
- Finding the root device of a labeled partition,
Simon Wydooghe <=