[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Booting from offset
From: |
Andrei Borzenkov |
Subject: |
Re: Booting from offset |
Date: |
Thu, 19 May 2016 06:56:35 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
18.05.2016 21:10, Diddier Hilarion пишет:
> Hi, the problem is the following.
> I have a hard disk with the first sector physically damaged (read or write
> is not possible so there is not partition table), I would like to know if
> it's possible to specify the root as the block device + an offset in which
> is the partition. Something like this:
>
> menuentry myos{
> ...
> set root=(hd0)+102400
> ...
> }
>
No. "root" refers to device, which is "hd0" in this case. "(hd0)+102400"
is file name and cannot be used for it.
What you could try is to create loopback device, like
loopback loop0 (hd0)102400+12345678
set root=loop0
where `12345671 above is exact block count from the offset 102400. You
can then use loop0 like any other device in grub except of course it
won't be known to a program you boot with grub.
You cannot omit block count currently.
> Where 102400 is the offset in any unit (sectors or bytes).
>
> I've seen this behavior to specify files in a filesystem but the
> documentation talks nothing about specify a partition in this way.
>
> ofcourse grub will be installed in a second block device.
>
> Thanks in advance.
>
>
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub
>