Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
HamPC with VirtualBox
Alex, Try this:? HTH and 73, On Sun, Nov 13, 2022 at 11:37 AM Alex Niu <alex.ve9ws@...> wrote: Hi Dave, --
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
Alex, What is the name of the image you converted? On Sun, Nov 13, 2022 at 2:58 PM Alex Niu <alex.ve9ws@...> wrote: Hi Dave, --
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
What version of VirtualBox are you using? --
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
Under Settings -> System -> Extended Features, Is "Enable EFI" checked? On Sun, Nov 13, 2022 at 3:24 PM Alex, VE9WS <alex.ve9ws@...> wrote:
--
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
I retraced your steps and it seems converted image to VDI format is somehow truncated by a couple of kB which breaks GPT partition table. To fix the issue please follow tips in??and add 1GB (or more if you'd like) to the disk size (I clicked via vbox gui and it worked). Then the machine booted normally to me.
Hope that helps. |
Pawel, Thanks for posting such an informative video. In fact, how can I encourage you to join the HamPi / HamPC / HamIQ development team? You would be a welcome addition... Question: am I doing something wrong when I'm creating the image? Am I making it too small accidentally, or is this just a required step to get the image to run on a VM? Please advise, and 73, On Wed, Nov 16, 2022 at 12:25 PM Pawel J via <laczliwosc-program.0l=[email protected]> wrote: Hi! --
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
Hi Dave,
Thanks for the invitation. I'll be more than happy to join but I don't know how much time I can commit at this moment. As for the image creation, I don't know what's your exact process but it seems the image is truncated by a few sectors (at least it seems like it). I tested the raw image on VBox, which you can do using the following command: VBoxManage internalcommands createrawvmdk -filename hampc.vmdk -rawdisk /path/to/HamPC_v3.0.1b1.img This creates a VMDK file which you can use in VirtualBox. Unfortunately it also won't boot. Extending the raw .img file by 1 MB with?dd if=/dev/zero bs=1m count=1 >> HamPC_v3.0.1b1.img and recreating the vmdk (you have to recreate because of the file size change) also doesn't make it boot which suggests that one of the GPT records is corrupted. Probably the backup one at the end of the disk image. The testdisk tool can fix it but it needs the space to write the second record, hence the 1MB added to the image (without it the Linux partition - the second one on disk - is still "invisible" and gdisk tool complains about overlapping it and GPT table - at the end of the disk I guess). Can you share how you create the .img file exactly? Are you using some kind of virtual machine? Thanks! PJ |
Pawel, I've sensed for a while now that there was some sort of "truncation" issue, but haven't been able to narrow it down... The process for generating the image is a manual, then automated, then manual again. Here's the high level: Insert new good SSD Using BalenaEtcher, flash base image Run Ansible (automated) shutdown -h now Insert SSD into Linux box. sudo gparted Unmount /dev/sdX1 Unmount /dev/sdX2 Resize /dev/sdX2 (Linux partition) to a "small size", around 16GB, versus the 128GB HamPi/HamPC is created on. # Improve compressibility of image by zeroing out free blocks sudo zerofree -v /dev/sdX2 # This is where I get the size of the drive sudo fdisk -l /dev/sdX
<end_block> = /dev/sdX End Block Example: 234441647 (If I were using 128GB drive) sudo dd if=/dev/sda bs=512 status=progress count=<end_block> | pxz -v -9 - > HamPi_FileName.img.xz What am I missing here? I mean, for simplicity, I suppose I could do this instead (and maybe it would fix the truncation issue) sudo dd if=/dev/sda status=progress?| pxz -v -9 - > HamPi_FileName.img.xz Thoughts? 73, On Wed, Nov 16, 2022 at 3:19 PM Pawel J via <laczliwosc-program.0l=[email protected]> wrote: Hi Dave, -- -- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
Hi!
I'd seem that you dd'ing until the end of sdX2 and not the whole disk may be the issue here. As far as I know the backup GPT partition table is in the last sector of the DISK and you may be loosing it. You can try your proposed approach with the whole disk dump and it may fix the issue here. One quick question. Why aren't you using a virtual machine for the whole process of creating the disk image? It would speed things up as for example you could create a VMDK of even raw disk image of 32GB in size and run the whole bunch Ansible?scripts on it and later just distribute the vm disk image without the whole workload od dd'ind the disk. I'm glad you were able to narrow the problem down to specific steps. In case I can help on something just let me know and we can setup another topic or you can contact me directly. Best regards! PJ |
I think that's the mistaken assumption I made -- that the end of the partition was the end of the disk... Sheesh, how am I supposed to deal with this? I make the image on a 128GB SSD and can't go distributing an image that's 128GB large... Maybe I need to go find a 16GB SSD (if such a thing still exists)? On Wed, Nov 16, 2022 at 4:43 PM Pawel J via <laczliwosc-program.0l=[email protected]> wrote: Hi! --
-- Dave,?? ? ? ? ? ? ? ? ? ? ? ?Technical Specialist,??-- --?? Lifetime Member:?////?-- --??-- |
to navigate to use esc to dismiss