ChanServ changed the topic of #ubuntu-asahi to: Ubuntu-Asahi development | Github: https://github.com/UbuntuAsahi | Logs: https://oftc.irclog.whitequark.org/ubuntu-asahi
tobhe has joined #ubuntu-asahi
tobhe_ has quit [Ping timeout: 480 seconds]
number0ne_ has joined #ubuntu-asahi
number0ne_ has quit [Quit: Konversation terminated!]
Paul[m] has joined #ubuntu-asahi
<Paul[m]> The goal for all of that is to resize my Ubuntu partition to make it bigger after I resized down my macOS partition
<Paul[m]> * macOS partition and I want to boot a liveusb in order to run gparted
<Paul[m]> Not sure if relevant but I'm on a Mac Mini M1 and the debian live is on a USB key connected to a USB-A port of my Mac Mini
<tobhe[m]> so you could potentially live resize it
<tobhe[m]> there was a change in u-boot at some point
<tobhe[m]> that changed all the boot commands
<Paul[m]> tobhe[m]: Only if the free space is right after the Linux partition no?
<Paul[m]> Which I guess isn't since I resized macOS to make some free space
<tobhe[m]> oh yeah right, that is true
<Paul[m]> tobhe[m]: How/where can I find the updated commands?
<tobhe[m]> let me see
<Paul[m]> After looking a bit around I couldn't figure out how to use it to boot :(
<Paul[m]> That's pretty weird btw because the U-Boot documentation for that version mentions `bootcmd_usb0`: https://docs.u-boot.org/en/v2024.04/develop/distro.html#:~:text=run%20bootcmd_usb0%20boots%20from%20the%20first%20usb%20mass%20storage%20device
<tobhe[m]> let me try on mine actually
<tobhe[m]> i somehow thought that usb boot should even be the default
<tobhe[m]> i think bootdev is the command you need actually
<tobhe[m]> bootdev select, try to select the usb drive and then boot
<tobhe[m]> if it doesn't show up maybe rescan with usb start or usb reset
<Paul[m]> bootdev select runs without an output or error
<tobhe[m]> does usb show up in bootdev list?
<Paul[m]> Tried to run usb start and usb reset but same issue
<tobhe[m]> it might also be a bit picky with usb drives
<tobhe[m]> usb reset should show sth like 1 Storage Device found
<tobhe[m]> and then bootdev list should have an usb_mass entry at the end
<Paul[m]> Sorry for the ugly screen shot, OCR wasn't working well
<Paul[m]> s/usb_mass/usb_mass_/, s/usb_mass/usb_mass_/
<tobhe[m]> ok and now I think you can use the bootflow command to scan and boot it
<Paul[m]> s/usb_mass/usb_mass_/, s/usb_mass/usb_mass_/
<tobhe[m]> bootdev select 3
<tobhe[m]> bootflow scan -b
<tobhe[m]> or sth like that
<Paul[m]> s/usb_mass/usb_mass_/, s/usb_mass/usb_mass_/
<tobhe[m]> according to the example at https://docs.u-boot.org/en/latest/usage/cmd/bootdev.html
<tobhe[m]> actually I wonder if we should tune our config. uboot supports a tui boot menu too
<tobhe[m]> that looks wrong. I'd expect booting ... usb_mass
<tobhe[m]> i guess that just boots regular ubuntu? ok
<tobhe[m]> I guess try bootflow scan without -b and then try to use bootflow to select the correct entry and boot that directly
<tobhe[m]> with bootflow boot
<tobhe[m]> this seems all too complicated tbh
<tobhe[m]> let me see if this works better with a newer uboot...
<Paul[m]> Ah we don't see it in that screen shot but I ran bootdev list and then bootdev select 4 before bootflow scan, bootflow list, bootflow select 0andbootflow boot`
<tobhe[m]> bootflow select 0
<tobhe[m]> and then bootflow boot
<tobhe[m]> maybe ?
<Paul[m]> Ah yes that's what I did at the end
<Paul[m]> That's after that point that it showed a GRUB shell, dunno which one is it (from the USB key or not). Not sure how to open a GRUB menu from there
<Paul[m]> It just restarted so I guess something is wrong
<tobhe[m]> still building a new u-boot
Saviq[m] has joined #ubuntu-asahi
<tobhe[m]> i guess we could make it smaller
<tobhe[m]> probably just copied that from desktop
<tobhe[m]> so I have a config with bootmenu now
<tobhe[m]> let me update it...
<tobhe[m]> I still wonder if the problem might just be that u-boot doesn't like that particular drive
<Paul[m]> Could be...
<Paul[m]> But then I wonder why it manages to boot GRUB after doing the manual commands?
<tobhe[m]> oh right i missed that
<tobhe[m]> ok and grub is misconfigured
<tobhe[m]> I thought it was your local installation's grub
<Paul[m]> tobhe[m]: Hmmmmm now I'm not even sure anymore
<Paul[m]> I have no idea
<tobhe[m]> so with this new u-boot you can just type bootmenu and select the usb option
<tobhe[m]> uploading to ubuntu-asahi-next right now...
<Paul[m]> Is ubuntu-asahi-next some kind of bleeding edge ppa?
<tobhe[m]> to make sure things can easily be tested fore rolling them out for everyone
<tobhe[m]> we usually build there and then copy to the regular ppa once we are confident nothing breaks
<Paul[m]> How would I go to update my installed u-boot with the new version?
<tobhe[m]> you could just download the deb via the web interface and install it via apt install or dpkg -i
<tobhe[m]> or add the ppa raise the priority to 1001 in /etc/apt/preferences.d/ubuntu-asahi.pref and the update
<Saviq[m]> Huh! This actually worked!
<Saviq[m]> I have a luks-crypted Ubuntu Asahi now 🎉
<tobhe[m]> Saviq: I wonder if we could actually just write the ISO to disk and then have it install over itself
<tobhe[m]> I built an openbsd installer at one point that works like that
<Saviq[m]> You probably have enough space in `/boot` to keep a network installer
<tobhe[m]> you could also pack it all into a UKI with ramdisk + kernel and dump it on the ESP
<Paul[m]> Do you have a recommendation for a live image I could try alternatively?
<Paul[m]> Interestingly I also see two usb_mass_ devices now
<Paul[m]> Oh wait nvm the second one is just an SSD I plugged in the meantime
<Paul[m]> This appears a split second before that the GRUB shell shows up
<Paul[m]> I think it appears for around 1/30 of a second lol
<Paul[m]> s/30/30th/
<Paul[m]> Ok I got a better screenshot
<Paul[m]> I'm not sure why it tries to load kernel from hd0,msdos1...
<Paul[m]> When you can see from the GRUB shell that then opens that that is clearly no (hd0,msdos1) but (hd3,msdos1)
<Paul[m]> When you can see from the GRUB shell that shows up immediately afterwards that there is clearly no (hd0,msdos1) but (hd3,msdos1)
<Paul[m]> When you can see from the GRUB shell that shows up immediately afterwards that there is clearly no (hd0,msdos1) but there is a (hd3,msdos1)
checkfoc_us9 has quit []
checkfoc_us9 has joined #ubuntu-asahi
checkfoc_us9 has quit []
checkfoc_us9 has joined #ubuntu-asahi
<Paul[m]> But either way if I manually write `linux (hd3,msdos1)/vmlinuz` as I did before it doesn't work
<tobhe[m]> I suppose you could try to find the disc by uuid
<tobhe[m]> but at least this seems to be a bug in the image rather than u-boot now
<tobhe[m]> hope it works 🙂 I could try to build a new one if it doesn't
<Paul[m]> sudo dd if=Downloads/ubuntu-24.04-preinstalled-desktop-arm64+asahi.img of=/dev/rdisk12 bs=1m is the right way to go, right? Running this from a macOS computer
<tobhe[m]> assuming rdisk12 is actually the usb drive that looks correct
<Paul[m]> Yes!
<Paul[m]> I ran `bootmenu` from U-Boot and chose the USB device. It then showed `Booting: usb 0` and then promisingly showed some Ubuntu splash/loading screen with animation that looked different from the one I'm used to with Ubuntu server. After a while it just rebooted unfortunately
<tobhe[m]> that would mean it got a little further and actually booted the kernel
<tobhe[m]> or at least started
<tobhe[m]> let me try to fix the debian one before I fix that though
<tobhe[m]> that seems easier
<Paul[m]> Maybe it's just a faulty USB stick?
<Paul[m]> (For the live Ubuntu thingie)
<Paul[m]> I looked around but the biggest USB key I could find is 8 GB, which I guess won't be enough (at least for the Ubuntu live image)
<tobhe[m]> so I think you could just run lsblk --fs to find the fs-uuid of the file system on your usb drive
<tobhe[m]> where UUID is whatever you found
<tobhe[m]> * where $UUID is
<tobhe[m]> on macos I think diskutil can do that too
<tobhe[m]> yes that worked for me
<tobhe[m]> fat UUID has the format XXXX-XXXX
<Paul[m]> <tobhe[m]> "and then:..." <- Replace `efi/debian/grub.cfg` on my Debian USB key with this right?
<tobhe[m]> yes
<Paul[m]> Weird error: no such device: root
<Paul[m]> After Loading Kernel...
<Paul[m]> :facepalm:
<tobhe[m]> that sounds like wrong uuid
<Paul[m]> Forgot to replace the UUID
<Paul[m]> Man I got that XHCI timeout on event type 0... error again
<Paul[m]> It randomly happens after some time while in GRUB/U-Boot
<Paul[m]> Was happening with the other USB key too
<Paul[m]> Will try to force reboot and try my luck again
<tobhe[m]> that is definitely a usb problem
<Paul[m]> Could be a bug in whatever handles USB?
<Paul[m]> Is it still necessary to run update-m1n1 at all or is this already done in the triggers of the U-Boot DEB you sent me?
<tobhe[m]> it should be done automatically on installation
<Paul[m]> My 3rd USB key does the same thing
<Paul[m]> Now I have some abort_td: Expected a TRB_TRANSFER TRB first as well (whichever comes first)
<tobhe[m]> that doesn't sound right
<tobhe[m]> I had to try 2. One didn't show up at all
<tobhe[m]> adding or removing bridges might help
<tobhe[m]> I guess at least we know u-boot works as well as the previous version, so I'll publish that
<Paul[m]> Ah interesting, mine all show up reliably