torios team mailing list archive
-
torios team
-
Mailing list archive
-
Message #01050
Re: Tarball making via chroot
Hi Israel,
It works for me. But you have changed things. I use chroot in OBI-9w but
not in the standard OBI. Maybe you can find the solution in this link
https://help.ubuntu.com/community/Grub2/Installing
Best regards
Nio
Den 2014-09-24 23:04, Israel skrev:
> Hi Nio,
> So the only thing it doesn't do is mount the newly installed OS as a chroot
> (along with the nessicary dev, sys, and proc directories) and update-grub.
> I ask this, because the chroot I made to work on the installed OS
> doesn't populate the /boot/grub folder.
> When I tried to install the tarball, it wouldn't boot. However I
> 'rebooted' the ISO and fixed grub, and can now boot into the new install.
> I think it would be useful to be able to update-grub on the installed
> system through OBI, for an instance like this.
> Mainly because I don't need 2 computers to build an OS, and can reuse
> the same debs for building both. (I cache them when I build the OS)
> And I can easily test the OS, and tweak it. Then I can rebuild a
> pristine version with the fixes.
>
> On 09/24/2014 08:46 AM, Nio Wiklund wrote:
>> Den 2014-09-24 15:06, Israel skrev:
>>> Hi, I made a tarball in a chroot.
>>> The only issue with using this tarball, is that the /boot/grub directory
>>> has nothing in it.
>>> After installing and repairing grub, I have booted into it.
>>>
>>> Nio, does OBI installer not run this?
>>> grub-install /dev/sda
>>>
>>> To fix grub I did it in chroot
>>> mount everything we need
>>>
>>> mount /dev/sda1 /mnt
>>> mount /dev /mnt/dev
>>> mount /sys /mnt/sys
>>> mount /proc /mnt/proc
>>>
>>> After this is done you can chroot into the install
>>>
>>> chroot /mnt
>>>
>>> update-grub
>>> exit
>>> umount /mnt/dev
>>> umount /mnt/sys
>>> umount /mnt/proc
>>> umount /mnt
>>>
>>> bootable system.
>>>
>>> Anyhow building the tar from a chroot is a fast way to prototype the
>>> base install, and recover from any mistakes. I can tweak it in a VM,
>>> and find better solutions, and simply rebuild the tarball again.
>>>
>>> Is it worth implementing the grub fixer/installer for chroot tarballs Nio?
>>>
>> Yes Israel,
>>
>> In my OBI-9w
>>
>> $ grep grub-install mk*
>> mkp1:"$startdir"/grub-installer "$device"
>> mkp2p1:"$startdir"/grub-installer "$device"
>> mkpxpy:"$startdir"/grub-installer "$target"
>>
>> and grub-installer is an own batch file containing what you ask for
>>
>> $ grep grub-install grub-installer
>> grub-install --boot-directory=/boot "$device"
>>
>>
>> In the standard OBI (where you got your obi-patch from)
>>
>> $ grep grub-install mk*
>> mkp1:grub-install --boot-directory=/mnt/boot "$device"
>> mkp2p1:grub-install --boot-directory=/mnt/boot "$device"
>> mkpxpy:grub-install --boot-directory=/mnt/boot "$target"
>>
>> Best regards
>> Nio
>
>
References