Open florensie opened 2 years ago
Can reproduce. GRUB2 and MEMDISK modes have the same behavior.
Can reproduce with Ventoy 1.0.80.
have the same problem Ventoy 1.0.80
Can confirm this happening as well. It would be great to have all my recoveries on same drive.
Can confirm. Could install Windows 11 on the Deck with this, but not the recovery.
I can confirm that too, the recovery image does not start.
Issue still persists. That's so frustrating...
https://ventoy.net/en/doc_subscription.html Maybe you will get better attention if you subscribe and ask nicely?
Same issue
Same issue. Would be great to be able to have the recovery image on ventoy as well!
I think its pretty obvious as to why it wont work, however i would like to get on the request bandwagon.
I'd also like to see this as an added supported OS.
Issue appears to persist with 1.0.88.
This issue still havent been solved it appears. I get blank screen like others mentioned.
I would also like to see this feature added. Would be nice to have everything on one USB.
I tested this by added the compressed img archive and it does not show up in the boot menu. Unpacking the iso from the archive results in a 10GB file that, like all of you are facing, does not boot from Ventoy.
It would be convenient for me to have my Steam Deck recovery image stored along with my Linux distros.
I think its pretty obvious as to why it wont work, however i would like to get on the request bandwagon.
kindly do explain if it is so obvious.
I think its pretty obvious as to why it wont work, however i would like to get on the request bandwagon.
@Pleasant-exe
It is not. Linux distrs and windows works, but this is not. It's becouse it's not ISO but IMG? Like it already have MBR inside?
Yes, it's indeed jsut image of full disk with all stem partitotions
But it only have part A not both A and B. I guess some conversion of disk is required to being able to boot from ventoy. that's a shame
bump, would like to see this supported
bumpzy, please make it happen ;p
Is there any workaround?
This is the error message I get when trying to boot the img from Ventoy 1.0.94
error: attempt to read or write outside of disk ‘hd3’.
Is there any workaround?
Unfortunately the current workaround is "don't use Ventoy".
Is there any workaround?
Is there any workaround?
Lol… did you read the comment above yours?
Lol at this stage we can just hope that person was trying to be funny (which failed successfully)
Lol at this stage we can just hope that person was trying to be funny (which failed successfully)
Right haha it got a good laugh from me.
In all seriousness though… the closest workaround with Ventoy is using HoloISO, for whatever reason that works… but useless for full recovery.
I hate to say this, but considering the comment that suggested to "subscribe and ask nicely" was downvoted into oblivion... I doubt this feature is high on the developer team's priority list.
Lol. 20 per year isn't even that much, and specific support for specific images is literally on the list of what a sub gets.
Would love for it to be supported if there's a chance. just made my new ventoy ISO and everything is in there except for SteamOS.
Still happens on latest Ventoy 1.0.96
Still happens
Hello.
I extrat the steam recovery .bz2 file, convert the .img file to .iso and I've got error while launching it trought Ventoy :
No bootfile found for UEFI!
Ventoy 1.0.96
When attempting to boot steamdeck-repair-20231127.10-3.5.7.img with ventoy 1.0.96, I get a series of messages as shown in this log. It seems the PARTUUID for the efi partition can't be found even though it does exist.
So, is there any sort of work being done on this??
Would be nice if someone from Valve could support on this. I think there's is great value and is a much better solution than using Rufus or Etcher. Pinging @Plagman as one of the public members of ValveSoftware.
@julianxhokaxhiu
Would be nice if someone from Valve could support on this.
Valve has no incentive to bother, they have created a reliable OS once it is installed. Many brands barely consider recovery work flow at all. Valve at least provides direct download and doesn't require a Windows specific tool to make them such as Lenovo, HP, Dell etc.
When it comes to device specific recoveries Ventoy hasn't really supported them as usually you can't test in virtual machine for them. For a generic Linux distro or Windows you have widely compatible systems in the first place because they want as large install base as possible.
Now for trying our own way to make it happen.
From grub.cfg in EFI.A partition
menuentry 'SteamOS' --class steamos --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f4fd9c69-0dce-4566-ad7d-e312393b9662' {
load_video
gfxmode $linux_gfx_mode
insmod steamenv
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root f4fd9c69-0dce-4566-ad7d-e312393b9662
steamenv_boot linux /boot/vmlinuz-linux-neptune-61 console=tty1 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 rd.systemd.gpt_auto=no loglevel=3 quiet splash plymouth.ignore-serial-consoles module_blacklist=tpm log_buf_len=4M amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 audit=0 fbcon=vc:4-6 fbcon=rotate:1
initrd /boot/amd-ucode.img /boot/initramfs-linux-neptune-61.img
}
The command "steamenv_boot" is a non standard grub2 command. search --fs-uuid might be able to be swapped out for search --label. It's possible we need to extract specific files from the image file along with using F6 extended menu function to get this to work. https://www.ventoy.net/en/plugin_grubmenu.html On Windows I cannot extract var-A partition, but /boot is likely in there.
@Tank-Missile
When attempting to boot steamdeck-repair-20231127.10-3.5.7.img with ventoy 1.0.96, I get a series of messages as shown in this log. It seems the PARTUUID for the efi partition can't be found even though it does exist.
This log is a promising start as we can see the kernel is running. with the [0.000000] time codes. when starting up can you press e on your keyboard on the "SteamOS" option when you are in grub menu & confirm that the above grub.cfg is loaded?
@catherinedoyel After doing research on how SteamOS boots up, I have determined and worked around the issue. The problem is, unlike an ISO, a raw disk image like the steam deck recovery image has no idea where the root filesystem is once the initramfs is loaded. This is because the raw disk image partitions are not set up inside the initramfs. To fix this problem, the initramfs inside the image must be modified. The image uses mkinitcpio to build the initramfs, so I created a build hook and run hook. Before these hooks can be placed inside the image, read-only mode must be disabled using the steamos-readonly command. The build hook can be placed in /etc/initcpio/install and the run hook can be placed in /etc/initcpio/hooks. Make sure to remove .txt from both files. The steamimg hook must then be set to run after the udev hook in /etc/mkinitcpio.conf.d/20-steamdeck.conf. Since the name and location of the image may change over time, I made a GRUB configuration option for the image partition and path. The option needs to be added to /etc/default/grub in the GRUB_CMDLINE_LINUX_DEFAULT variable. The syntax is steamimg=\imagepart>@\<imagepath. \
@Tank-Missile, did you mount the image and then chroot in to make these changes?
@katherinehackworth That is exactly what I did. I used losetup -Pf to mount the image as a loop device. I could then mount the partitions like I would do with a real drive, and then chroot into the root partition.
Awesome. I made an issue on the SteamOS repo, if it doesn't get any response I'll just have to figure out how to actually use mkinitcpio
@Tank-Missile To clarify: the imagepart variable would translate to "/dev/disk/by-partsets/self/rootfs" as shown in /etc/fstab while imagepath is currently "/boot/initramfs-linux-neptune-61.img"?.. And the steamimg hook is inserted to the right of udev in /etc/mkinitcpio.conf.d/20-steamdeck.conf?
I tried using your workaround, but the grub-mkconfig command gives "realpath: /dev/disk/by-partsets/self/rootfs: No such file or directory", the mkinitcpio command outputs both "==> ERROR: Hook 'steamimg' cannot be found" and "==> ERROR: file not found: ''".. And when I try and boot the image, it reads (among similar errors) "mount: /mnt: special device /dev/disk/by-partuuid/[UUID] does not exist"
Thank you for coming up with a solution! If you have time to help me resolve my issues, I would greatly appreciate it!
After doing research on how SteamOS boots up, I have determined and worked around the issue. The problem is, unlike an ISO, a raw disk image like the steam deck recovery image has no idea where the root filesystem is once the initramfs is loaded. This is because the raw disk image partitions are not set up inside the initramfs.
I'm not sure what you mean by this. SteamOS isn't any different than other Linux distributions (at least ones not using a hybrid ISO), and setting up the disk partitions is the primary role of the initramfs. The actual issue appears to be that Ventoy is unable to make the emulated disk visible to Linux, presumably due to an incompatibility with SteamOS's A/B boot system (which works by first using a custom EFI chainloader to boot the correct installation of GRUB, then using a custom GRUB module to boot Linux from the correct partition).
Adding a kernel parameter to manually run losetup
is just a workaround, and doesn't actually solve the issue.
@leo60228 I never said this was an issue exclusive to the deck image. The problem is the initramfs can't serve its primary role when the partitions it needs are not available. I never claimed my solution solved the problem. It's a hacky workaround until a permanent solution can be implemented. I'm not sure how this could be done, unless there's a way to modify how Ventoy boots raw images.
Tested again on Ventoy 1.0.98 and unfortunately still doesn't boot. I wonder though if playing a bit with this might help the cause as it seems to exactly fill the void we have with the recovery images provided by Valve https://www.ventoy.net/en/plugin_vtoyboot.html
@Lanklow , did you ever get this working? I'm trying to follow @Tank-Missile 's instructions, but not clear where imagepart and imagepath are derived from...
Here's my script so far:
#!/usr/bin/env bash
# Fetch latest steamdeck repair image URL
RECOVERY_IMG="$(basename $(curl -s "https://steamdeck-images.steamos.cloud/recovery/?C=M&O=D" | grep -oE "[^\">]*img.bz2" | head -1) .bz2)"
# If the file doesn't already exist, download and decompress
if [ ! -f ${RECOVERY_IMG} ]; then
# Download
curl -sO https://steamdeck-images.steamos.cloud/recovery/${LATEST_RECOVERY_IMAGE}.bz2 && (
bunzip2 ${RECOVERY_IMG}.bz2 # uncompress
)
fi
# Create a loopback to work on the image
sudo losetup -P /dev/loop0 ${RECOVERY_IMG}
mkdir steamos-root
sudo mount /dev/loop0p3 steamos-root/
# Turn off SteamOS read-only mode
sudo chroot steamos-root/ /usr/bin/btrfs property set / ro false
# Download @Tank-Missle's steamimg hook files
curl -sL https://github.com/ventoy/Ventoy/files/14809805/steamimg-install.txt | sudo tee steamos-root/etc/initcpio/install/steamimg-install
curl -sL https://github.com/ventoy/Ventoy/files/14809810/steamimg-hook.txt | sudo tee steamos-root/etc/initcpio/hooks/steamimg-hook
# Add hook to /etc/mkinitcpio.conf.d/20-steamdeck.conf
grep -q steamimg steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf || sed -i 's/udev /steamimg udev/' steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf
# Patch GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
IMAGEPART="<imagepart>" # FIXME
IMAGEPATH="<imagepath>" # FIXME
sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s/\(.*\)\"/\1 steamimg=${IMAGEPART}@${IMAGEPATH}\"/" steamos-root/etc/default/grub
# Apply grub changes
sudo chroot steamos-root/ /usr/bin/grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg
# initramfs then needs to be rebuilt
sudo chroot steamos-root/ /usr/bin/mkinitcpio -P
# Re-enable SteamOS read-only mode
sudo chroot steamos-root/ /usr/bin/sync /
sudo chroot steamos-root/ /usr/bin/btrfs property set / ro true
sudo umount steamos-root/
sudo losetup -d /dev/loop0
# TODO: copy the image file to Ventoy (does it need to be renamed to .ISO?)
@Lanklow , did you ever get this working? I'm trying to follow @Tank-Missile 's instructions, but not clear where imagepart and imagepath are derived from...
Here's my script so far:
#!/usr/bin/env bash # Fetch latest steamdeck repair image URL RECOVERY_IMG="$(basename $(curl -s "https://steamdeck-images.steamos.cloud/recovery/?C=M&O=D" | grep -oE "[^\">]*img.bz2" | head -1) .bz2)" # If the file doesn't already exist, download and decompress if [ ! -f ${RECOVERY_IMG} ]; then # Download curl -sO https://steamdeck-images.steamos.cloud/recovery/${LATEST_RECOVERY_IMAGE}.bz2 && ( bunzip2 ${RECOVERY_IMG}.bz2 # uncompress ) fi # Create a loopback to work on the image sudo losetup -P /dev/loop0 ${RECOVERY_IMG} mkdir steamos-root sudo mount /dev/loop0p3 steamos-root/ # Turn off SteamOS read-only mode sudo chroot steamos-root/ /usr/bin/btrfs property set / ro false # Download @Tank-Missle's steamimg hook files curl -sL https://github.com/ventoy/Ventoy/files/14809805/steamimg-install.txt | sudo tee steamos-root/etc/initcpio/install/steamimg-install curl -sL https://github.com/ventoy/Ventoy/files/14809810/steamimg-hook.txt | sudo tee steamos-root/etc/initcpio/hooks/steamimg-hook # Add hook to /etc/mkinitcpio.conf.d/20-steamdeck.conf grep -q steamimg steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf || sed -i 's/udev /steamimg udev/' steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf # Patch GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub IMAGEPART="<imagepart>" # FIXME IMAGEPATH="<imagepath>" # FIXME sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s/\(.*\)\"/\1 steamimg=${IMAGEPART}@${IMAGEPATH}\"/" steamos-root/etc/default/grub # Apply grub changes sudo chroot steamos-root/ /usr/bin/grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg # initramfs then needs to be rebuilt sudo chroot steamos-root/ /usr/bin/mkinitcpio -P # Re-enable SteamOS read-only mode sudo chroot steamos-root/ /usr/bin/sync / sudo chroot steamos-root/ /usr/bin/btrfs property set / ro true sudo umount steamos-root/ sudo losetup -d /dev/loop0 # TODO: copy the image file to Ventoy (does it need to be renamed to .ISO?)
Never got it working myself... Hope you get clarification, because your script is pretty sweet!
Fixed a bunch of typos and bugs in the script, still needs correction for ImagePart / ImagePath...
#!/usr/bin/env bash
# Fetch latest steamdeck repair image URL
RECOVERY_IMG="${1:-$(basename $(curl -s "https://steamdeck-images.steamos.cloud/recovery/?C=M&O=D" | grep -oE "[^\">]*img.bz2" | head -1) .bz2)}"
# If the file doesn't already exist, download and decompress
if [ ! -f ${RECOVERY_IMG} ]; then
# Download
curl -sO https://steamdeck-images.steamos.cloud/recovery/${LATEST_RECOVERY_IMAGE}.bz2 && (
bunzip2 ${RECOVERY_IMG}.bz2 # uncompress
)
fi
# set -x
# Create a loopback to work on the image
sudo losetup -P /dev/loop0 ${RECOVERY_IMG}
mkdir steamos-root
sudo mount /dev/loop0p3 steamos-root/
# Turn off SteamOS read-only mode
sudo chroot steamos-root/ /usr/bin/btrfs property set / ro false
# Download @Tank-Missle's steamimg hook files
[ -f steamos-root/usr/lib/initcpio/install/steamimg-install ] || curl -sL https://github.com/ventoy/Ventoy/files/14809805/steamimg-install.txt | sudo tee steamos-root/usr/lib/initcpio/install/steamimg
[ -f steamos-root/usr/lib/initcpio/hooks/steamimg-hook ] || curl -sL https://github.com/ventoy/Ventoy/files/14809810/steamimg-hook.txt | sudo tee steamos-root/usr/lib/initcpio/hooks/steamimg
# Add hook to /etc/mkinitcpio.conf.d/20-steamdeck.conf
grep -q steamimg steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf || sudo sed -i 's/udev /udev steamimg /' steamos-root/etc/mkinitcpio.conf.d/20-steamdeck.conf
# Patch GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
IMAGEPART="\\/dev\\/mmcblk0p1" # FIXME: running from SD Card dev?
IMAGEPATH="\\/${RECOVERY_IMG}" # FIXME: image name will be copied to root of IMAGEPART?
sudo sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s/\\(.*\\)\"/\\1 steamimg=${IMAGEPART}@${IMAGEPATH}\"/" steamos-root/etc/default/grub
# Apply grub changes
sudo mount /dev/loop0p1 steamos-root/efi
sudo chroot steamos-root/ /bin/bash --login /usr/bin/grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg
# initramfs then needs to be rebuilt
sudo mount --bind /proc steamos-root/proc
sudo mount --bind /dev steamos-root/dev
sudo chroot steamos-root/ /bin/bash --login /usr/bin/mkinitcpio -P
# Re-enable SteamOS read-only mode
sudo chroot steamos-root/ /usr/bin/sync /
sudo chroot steamos-root/ /usr/bin/btrfs property set / ro true
sudo umount steamos-root/dev
sudo umount steamos-root/proc
sudo umount steamos-root/efi
# sudo umount steamos-root/
# sudo losetup -d /dev/loop0
# TODO: copy the image file to Ventoy
# sudo mount /dev/mmcblk0p1 /run/media/${USER}/Ventoy # use dolphin instead
# cp steamdeck-repair-20231127.10-3.5.7.img /run/media/${USER}/Ventoy
# Reset
# sudo umount steamos-root; sudo losetup -D; sudo losetup -l; cp steamdeck-repair-20231127.10-3.5.7.img.orig steamdeck-repair-20231127.10-3.5.7.img
Here's the output:
mkdir: cannot create directory ‘steamos-root’: File exists
#!/bin/bash
build() {
add_module loop
add_runscript
}
help() {
cat <<HELPEOF
Support for mounting the steam
deck recovery image from Ventoy.
Syntax: steamimg=<imagepart>@<imagepath>
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
run_hook() {
case $steamimg in
*@*)
imgpart=${steamimg%%@*}
imgpath=${steamimg#*@}
poll_device "$imgpart"
mkdir /imgpart_root
mount "$imgpart" /imgpart_root
if ! losetup -Pf /imgpart_root"$imgpath"; then
err "Unable to set up steam deck recovery image /imgpart_root$imgpath"
fi
;;
esac
}
/usr/bin/grub-probe: error: cannot find a device for / (is /dev mounted?).
==> Building image from preset: /etc/mkinitcpio.d/linux-neptune-61.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-neptune-61 -g /boot/initramfs-linux-neptune-61.img --microcode /boot/amd-ucode.img
==> Using drop-in configuration file: '20-steamdeck.conf'
==> Starting build: '6.1.52-valve9-1-neptune-61'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [steamimg]
-> Running build hook: [steamos]
==> ERROR: file not found: ''
-> Running build hook: [steam-deck]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [modconf]
-> Running build hook: [keyboard]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [resume]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-neptune-61.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Building image from preset: /etc/mkinitcpio.d/linux-neptune-61.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-neptune-61 -g /boot/initramfs-linux-neptune-61-fallback.img -S autodetect --microcode /boot/amd-ucode.img
==> Using drop-in configuration file: '20-steamdeck.conf'
==> Starting build: '6.1.52-valve9-1-neptune-61'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [steamimg]
-> Running build hook: [steamos]
==> ERROR: file not found: ''
-> Running build hook: [steam-deck]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [modconf]
-> Running build hook: [keyboard]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [resume]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-neptune-61-fallback.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
@deftdawg imagepart is the partition in fstab format or directly using /dev/ devices. imagepath is the path in the partition starting from the root directory of the partition. For instance, /dev/sda2@/Images/steamdeck-repair-20231127.10-3.5.7.img. There are cases where the device order will be different, so to be safe you could do LABEL=Ventoy@/Images/steamdeck-repair-20231127.10-3.5.7.img
Official FAQ
Ventoy Version
1.0.79
What about latest release
Yes. I have tried the latest release, but the bug still exist.
BIOS Mode
UEFI Mode
Partition Style
GPT
Disk Capacity
32GB
Disk Manufacturer
SanDisk
Image file checksum (if applicable)
No.
Image file download link (if applicable)
https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3
What happened?
I first extracted the .img file with
bunzip2
. It hangs on a black screen and never loads.