IRC channel logs

2019-11-20.log

back to list of logs

***Server sets mode: +nt
<damo22>how do i install grub into mbr on a standalone disk?
<damo22>i tried injecting the first 512 bytes into the disk from another disk that was bootable
<youpi>grub-install /dev/hd0
<damo22>and fixing the partition table
<youpi>it needs not ony the first sector, but also the stage1.5 to be put right after it
<damo22>oh
<damo22>can i run grub2-install rootfs5G.dd ?
<damo22>its a full disk image
<AlmuHS>if you want to boot a image from GRUB, you could add a new entry for this in grub.cfg
<damo22>no i am doing some fancy stuf
<damo22>booting off a disk image at the same time as attaching a real disk on a second controller in qemu
<AlmuHS>grub2-install is for install GRUB in a devices
<AlmuHS>you can install GRUB in a external device, if you want
<damo22>can i mount it loopback in linux and do grub-install /dev/loop0 ?
<damo22>its a disk image
<AlmuHS>but then, you only will can boot the system when the device which has GRUB installed is connected
<damo22>of course
<damo22>i am preparing the disk for use with qemu
<damo22>i basically rsynced / to a disk image and i need to fix the mbr
<damo22>and make bootable
<AlmuHS>oh, ok . You can use fdisk to do this, is not?
<damo22>no i need to install grub
<AlmuHS>do you want install grub in /dev/loop0 ?
<damo22>yes
<damo22>i'll just try it
<AlmuHS>Isn't this a temporary device unit?
<damo22>:|
<damo22>never mind i'll work it out
<damo22>thanks though
<damo22># grub2-install /dev/loop0
<damo22>Installing for i386-pc platform.
<damo22>Installation finished. No error reported.
<damo22>it boots to grub rescue at least!
<AlmuHS>do a backup of the VM before reboot
<damo22>im not in a vm
<damo22>im in linux with hurd installed on external disk and a disk image
<AlmuHS>do a backup of the harddisk then
<AlmuHS>because I'm not sure if this experiment will works
<damo22>the external disk works
<damo22>but i want to clone it with smaller / and boot off a disk image
<damo22>ive prepared the disk image but its non-bootable
<AlmuHS>you can add a boot flag to the image
<damo22>no it needs grub installed on the disk correctly
<AlmuHS>ok
<damo22>because even with partition 1 cloned
<damo22>grub lives in mbr and somewhere else too
<AlmuHS>yes, I know
<damo22>what do i set prefix to
<AlmuHS>but I'm worry about /dev/loop0 could be a temporary device unit, instead a real device unit
<damo22>it is temporary, because i losetuped the disk image there
<damo22>just to install grub
<AlmuHS>but, in this case, when you reboot the machine, this unit will dissapears
<damo22>i am not rebooting the machine
<damo22>i am in linux
<damo22>hurd is running as qemu vm
<damo22>but not even yet
<youpi>for the VM it doesn't matter if it's served from loop0 or a file, the VM will see it as a drive anyway
<AlmuHS>then, you are using a linux temporary device unit to install GRUB for the Hurd which runs in qemu
<damo22>yes
<damo22>i just need grub-install to find the device
<AlmuHS>oh, ok, now I understand
<damo22>so i can make the image bootable
<AlmuHS>yes
<damo22>then boot it in a vm
<AlmuHS>yes
<damo22>what is prefix=
<damo22>in grub
<damo22>usually?
<damo22>/boot/grub/i386-pc ?
<AlmuHS>I don't remember
<AlmuHS>you can explore grub files in filesystem, or reads GRUB docs
<AlmuHS>the grub entries are in grub.cfg
<AlmuHS>but you might be careful editing this file, because "update-grub" overwrite It
<damo22>prefix is not in the grub.cfg its burnt into grub at compile time
<damo22>i just cant remember what it is supposed to be
<AlmuHS>reads docs then
<damo22>set prefix=/boot/grub
<damo22>insmod normal
<damo22>normal
<damo22>!!!
<damo22>yay
<AlmuHS>:)
<gnu_srs1>youpi,jrtc27: Maybe you should also add yourselves to Proposal D Seconds wrt the GR.
<youpi>I don't have time to delve into it
<AlmuHS>youpi: I tried to "apt full-upgrade" my Debian GNU/Hurd in the Thinkpad T60, but the hurd package is buggy and fails to configure
<AlmuHS>I sent an email a week ago, with more details
***Glider_IRC_ is now known as Glider_IRC
<alextee>does the hurd have potential to be faster than linux?
<alextee>well this https://www.gnu.org/software/hurd/faq/slow.html implies that there's nothing stopping the hurd from achieving the same speed as linux, cool
<ArneBab>alextee: I’d rather think it has the potential to be similarly fast, but with higher security and a less complex set of supporting tools. See https://www.gnu.org/software/hurd/community/weblogs/ArneBab/technical-advantages-of-the-hurd.html
<alextee[m]>ArneBab: thanks, i just read that. sounds very interesting
<alextee[m]>i'm willing to help, I can code in C but I don't have much experience with system programming although I'd love to learn. i will do some research first
<ArneBab>have a look here: https://www.gnu.org/software/hurd/contributing.html
<ArneBab>(happy to hear that!)
<alextee[m]>thanks! is there a guide somewhere that explains what does what in the source code?
<ArneBab>I can’t guide you yet, but I’m sure others can.
<ArneBab>see https://www.gnu.org/software/hurd/hurd/documentation.html and https://www.gnu.org/software/hurd/microkernel/mach/documentation.html
<ArneBab>see https://www.gnu.org/software/hurd/hurd/documentation.html and https://www.gnu.org/software/hurd/microkernel/mach/documentation.html
<raghavgururajan>ArneBab Thanks!
<alextee[m]>excellent, thanks! ArneBab
<ArneBab>I’ll be back another day — happy hacking!
***Glider_IRC_ is now known as Glider_IRC