reinstall icon indicating copy to clipboard operation
reinstall copied to clipboard

Debian 13 on Oracle Cloud OCI (running Ubuntu)

Open tortoise4race opened this issue 1 month ago • 7 comments

原来的系统 (Original system): Ubuntu 22.04.4 LTS (GNU/Linux 6.8.0-1037-oracle x86_64) Oracle Cloud OCI "shape": "VM.Standard.E2.1.Micro",

要安装的系统 (System to be installed):

Debian 13

遇到的问题 (Issue): Can not installed. Boot in to grub

Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 6.8.0-1037-oracle x86_64)

  • Documentation: https://help.ubuntu.com
  • Management: https://landscape.canonical.com
  • Support: https://ubuntu.com/pro

System information as of Tue Oct 28 22:03:09 UTC 2025

System load: 0.16 Processes: 200 Usage of /: 49.8% of 96.73GB Users logged in: 0 Memory usage: 56% IPv4 address for ens3: 10.0.0.44 Swap usage: 49%

  • Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s just raised the bar for easy, resilient and secure K8s cluster deployment.

    https://ubuntu.com/engage/secure-kubernetes-at-the-edge

Expanded Security Maintenance for Applications is not enabled.

87 updates can be applied immediately. To see these additional updates run: apt list --upgradable

1 additional security update can be applied with ESM Apps. Learn more about enabling ESM Apps service at https://ubuntu.com/esm

New release '24.04.3 LTS' available. Run 'do-release-upgrade' to upgrade to it.

"availabilityDomain": "CdDh:US-ASHBURN-AD-3", "canonicalRegionName": "us-ashburn-1", "shape": "VM.Standard.E2.1.Micro", "shapeConfig": { "maxVnicAttachments": 1, "memoryInGBs": 1.0, "networkingBandwidthInGbps": 0.48, "ocpus": 1.0

$ sudo -s cd ~ curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 147k 100 147k 0 0 761k 0 --:--:-- --:--:-- --:--:-- 766k

bash reinstall.sh debian 13

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 192 0 192 0 0 6394 0 --:--:-- --:--:-- --:--:-- 6620 Location: US ***** SET NEXTOS DEBIAN 13 ***** kvm VM: true ***** DOWNLOAD VMLNUZ AND INITRD ***** https://deb.debian.org/debian/dists/trixie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.5M 100 11.5M 0 0 8084k 0 0:00:01 0:00:01 --:--:-- 8088k https://deb.debian.org/debian/dists/trixie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 38.7M 100 38.7M 0 0 5872k 0 0:00:06 0:00:06 --:--:-- 6106k ***** MOD DEBIAN INITRD ***** 131802 blocks https://raw.githubusercontent.com/bin456789/reinstall/main/trans.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 238k 100 238k 0 0 3763k 0 --:--:-- --:--:-- --:--:-- 3777k https://raw.githubusercontent.com/bin456789/reinstall/main/initrd-network.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16587 100 16587 0 0 477k 0 --:--:-- --:--:-- --:--:-- 490k ***** NETWORK INFO ***** IPv4 MAC: 02:00:17:18:fe:27 IPv4 Address: 10.0.0.44/24 IPv4 Gateway: 10.0.0.1

IPv6 MAC: IPv6 Address: IPv6 Gateway:

https://raw.githubusercontent.com/bin456789/reinstall/main/fix-eth-name.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7823 100 7823 0 0 213k 0 --:--:-- --:--:-- --:--:-- 218k https://raw.githubusercontent.com/bin456789/reinstall/main/fix-eth-name.service % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 845 100 845 0 0 18035 0 --:--:-- --:--:-- --:--:-- 18369 https://raw.githubusercontent.com/bin456789/reinstall/main/get-xda.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 688 100 688 0 0 11904 0 --:--:-- --:--:-- --:--:-- 12070 https://raw.githubusercontent.com/bin456789/reinstall/main/ttys.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 775 100 775 0 0 15629 0 --:--:-- --:--:-- --:--:-- 15816 http://deb.debian.org/debian/dists/trixie/main/debian-installer/binary-amd64/Packages.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 65996 100 65996 0 0 544k 0 --:--:-- --:--:-- --:--:-- 546k http://deb.debian.org/debian/pool/main/u/util-linux/fdisk-udeb_2.41-5_amd64.udeb % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 960k 100 960k 0 0 100M 0 --:--:-- --:--:-- --:--:-- 104M ***** SLIM INITRD ***** 73M . 45M . ***** DOWNLOAD GRUB EFI ***** https://d2lzkl7pfhq30w.cloudfront.net/pub/fedora/linux/releases/43/Everything/x86_64/os/EFI/BOOT/grubx64.efi % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3951k 100 3951k 0 0 20.9M 0 --:--:-- --:--:-- --:--:-- 20.9M BootNext: 0002 BootCurrent: 0005 Timeout: 0 seconds BootOrder: 0005,0004,0001,0000,0003 Boot0000* UiApp Boot0001* UEFI ORACLE BlockVolume Boot0002* reinstall (debian 13) Boot0003* EFI Internal Shell Boot0004* ubuntu Boot0005* ubuntu ***** MAIN DISK: SDA ***** 31B35DB6-F7EE-4455-84FE-2F139BB7AA68 ***** GRUB ***** /boot/efi/EFI/reinstall/grub.cfg set timeout_style=menu set timeout=5 menuentry "reinstall (debian 13)" --unrestricted { insmod lvm insmod all_video search --no-floppy --file --set=root /reinstall-vmlinuz linux /reinstall-vmlinuz lowmem/low=1 auto=true priority=critical url=https://raw.githubusercontent.com/bin456789/reinstall/main/debian.cfg mirror/http/hostname=deb.debian.org mirror/http/directory=/debian base-installer/kernel/image=linux-image-cloud-amd64 extra_confhome='https://raw.githubusercontent.com/bin456789/reinstall/main' extra_main_disk=31B35DB6-F7EE-4455-84FE-2F139BB7AA68 extra_elts=0 extra_deb_mirror=deb.debian.org/debian initrd /reinstall-initrd } ***** INFO ***** debian 13 Username: root Reboot to start the installation.

========================================================== Cloud Shell (Console)

IMPORTANT: Use a console connection to troubleshoot a malfunctioning instance. For normal operations, you should connect to the instance using a Secure Shell (SSH) or Remote Desktop connection. For steps, see https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/accessinginstance.htm

For more information about troubleshooting your instance using a console connection, see the documentation: https://docs.cloud.oracle.com/en-us/iaas/Content/Compute/References/serialconsole.htm#four

Oracle OVMF Version: 1.6.4.oci SEC Phase: Complete. PEIM Loaded: PcdPeim.efi PEIM Loaded: ReportStatusCodeRouterPei.efi PEIM Loaded: StatusCodeHandlerPei.efi PEIM Loaded: PlatformPei.efi PEIM Loaded: PeiCore.efi PEIM Loaded: PcdPeim.efi PEIM Loaded: DxeIpl.efi PEIM Loaded: S3Resume2Pei.efi PEIM Loaded: CpuMpPei.efi PEIM Loaded: TpmMmioSevDecryptPei.efi PEIM Loaded: Tcg2ConfigPei.efi PEIM Loaded: TcgPei.efi PEIM Loaded: Tcg2Pei.efi PEIM Loaded: Tcg2PlatformPei.efi PEI Phase: Complete. PEIM Loaded: DxeCore.efi Loading DXE Modules: Image Loaded: DevicePathDxe.efi Image Loaded: PcdDxe.efi Image Loaded: AmdSevDxe.efi Image Loaded: FvbServicesRuntimeDxe.efi Image Loaded: ReportStatusCodeRouterRuntimeDxe.efi Image Loaded: RuntimeDxe.efi Image Loaded: SecurityStubDxe.efi Image Loaded: EbcDxe.efi Image Loaded: Legacy8259.efi Image Loaded: CpuIo2Dxe.efi Image Loaded: CpuDxe.efi Image Loaded: IncompatiblePciDeviceSupportDxe.efi Image Loaded: PciHotPlugInitDxe.efi Image Loaded: ResetSystemRuntimeDxe.efi Image Loaded: Metronome.efi Image Loaded: HiiDatabase.efi Image Loaded: NullMemoryTestDxe.efi Image Loaded: AcpiTableDxe.efi Image Loaded: S3SaveStateDxe.efi Image Loaded: DpcDxe.efi Image Loaded: IoMmuDxe.efi Image Loaded: EmuVariableFvbRuntimeDxe.efi Image Loaded: VariableRuntimeDxe.efi Image Loaded: TcgDxe.efi Image Loaded: StatusCodeHandlerRuntimeDxe.efi Image Loaded: Timer.efi Image Loaded: PciHostBridgeDxe.efi Image Loaded: SetupBrowser.efi Image Loaded: SmbiosDxe.efi Image Loaded: QemuFwCfgAcpiPlatform.efi Image Loaded: BootScriptExecutorDxe.efi Image Loaded: tftpDynamicCommand.efi Image Loaded: httpDynamicCommand.efi Image Loaded: LinuxInitrdDynamicShellCommand.efi Image Loaded: LogoDxe.efi Image Loaded: QemuRamfbDxe.efi Image Loaded: FaultTolerantWriteDxe.efi Image Loaded: Tcg2Dxe.efi Image Loaded: PcRtc.efi Image Loaded: WatchdogTimer.efi Image Loaded: MonotonicCounterRuntimeDxe.efi Image Loaded: CapsuleRuntimeDxe.efi Image Loaded: DriverHealthManagerDxe.efi Image Loaded: BdsDxe.efi Image Loaded: RamDiskDxe.efi Image Loaded: DisplayEngine.efi Image Loaded: SmbiosPlatformDxe.efi Image Loaded: PlatformDxe.efi Image Loaded: PciBusDxe.efi Image Loaded: VirtioPciDeviceDxe.efi Image Loaded: Virtio10.efi Image Loaded: VirtioBlkDxe.efi Image Loaded: VirtioScsiDxe.efi Image Loaded: VirtioRngDxe.efi Image Loaded: PvScsiDxe.efi Image Loaded: MptScsiDxe.efi Image Loaded: ConPlatformDxe.efi Image Loaded: ConSplitterDxe.efi Image Loaded: GraphicsConsoleDxe.efi Image Loaded: TerminalDxe.efi Image Loaded: QemuKernelLoaderFsDxe.efi Image Loaded: DiskIoDxe.efi Image Loaded: PartitionDxe.efi Image Loaded: EnglishDxe.efi Image Loaded: ScsiBus.efi Image Loaded: ScsiDisk.efi Image Loaded: SataController.efi Image Loaded: AtaAtapiPassThruDxe.efi Image Loaded: AtaBusDxe.efi Image Loaded: NvmExpressDxe.efi Image Loaded: SioBusDxe.efi Image Loaded: PciSioSerialDxe.efi Image Loaded: Ps2KeyboardDxe.efi Image Loaded: BootGraphicsResourceTableDxe.efi Image Loaded: Fat.efi Image Loaded: UdfDxe.efi Image Loaded: VirtioFsDxe.efi Image Loaded: SnpDxe.efi Image Loaded: VlanConfigDxe.efi Image Loaded: MnpDxe.efi Image Loaded: ArpDxe.efi Image Loaded: Dhcp4Dxe.efi Image Loaded: Ip4Dxe.efi Image Loaded: Udp4Dxe.efi Image Loaded: Mtftp4Dxe.efi Image Loaded: TcpDxe.efi Image Loaded: UefiPxeBcDxe.efi Image Loaded: IScsiDxe.efi Image Loaded: VirtioNetDxe.efi SecureBoot: Disabled Boot Options: GNU GRUB version 2.12-9 Boot0006: debian <HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi> Minimal BASH-like line editing is supported. For the first word, TAB ,0x1)> lists possible command completions. Anywhere else TAB lists possible /FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)> device or file completions. To enable less(1)-like paging, "set
pager=1". 51,0x800,0x32000)/\EFI\debian\shimx64.efi Starting Boot0006 "debian" from HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi

grub>

tortoise4race avatar Oct 29 '25 21:10 tortoise4race

Seems grub.cfg is missing but I can't reproduct it.

Show me the output of ls configfile (hd0,gpt2)/ and ls configfile (hd0,gpt2)/boot/grub/

then try this command to boot the system configfile (hd0,gpt2)/boot/grub/grub.cfg

bin456789 avatar Oct 30 '25 02:10 bin456789

SecureBoot: Disabled Boot Options: GNU GRUB version 2.12-9 Boot0006: debian <HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi> Minimal BASH-like line editing is supported. For the first word, TAB ,0x1)> lists possible command completions. Anywhere else TAB lists possible /FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)> device or file completions. To enable less(1)-like paging, "set
pager=1". 51,0x800,0x32000)/\EFI\debian\shimx64.efi Starting Boot0006 "debian" from HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi

grub> ls configfile (hd0,gpt2)/ lost+found/ boot/ etc/ media/ vmlinuz.old var/ usr/ dev/ home/ proc/ root/ run/ sys/ tmp/ bin lib lib64 sbin mnt/ srv/ opt/ initrd.img.old vmlinuz initrd.img grub> ls configfile (hd0,gpt2)/boot/grub/ unicode.pf2 x86_64-efi/ locale/ fonts/ grub.cfg.new grubenv grub>

I try to boot but this return grub console
configfile (hd0,gpt2)/boot/grub/grub.cfg ....... ...... Image Loaded: TcpDxe.efi Image Loaded: UefiPxeBcDxe.efi Image Loaded: IScsiDxe.efi Image Loaded: VirtioNetDxe.efi grub>

Try to boot with existing grub.cfg.new ; this seems ok

configfile (hd0,gpt2)/boot/grub/grub.cfg.new

Debian GNU/Linux 13 localhost ttyS0

localhost login: root (no password required)

Linux localhost 6.12.43+deb13-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1 (2025-08-27) x86_64

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@localhost:~#

How can I repair the boot / grub config ?

tortoise4race avatar Oct 30 '25 11:10 tortoise4race

Remote login doesn't seem to be working. I have changed the password, but login from the internet was not successful.

root@localhost:/# ls -la / total 64 drwxr-xr-x 18 root root 4096 Oct 29 06:50 . drwxr-xr-x 18 root root 4096 Oct 29 06:50 .. lrwxrwxrwx 1 root root 7 Oct 29 06:47 bin -> usr/bin drwxr-xr-x 4 root root 4096 Oct 29 06:52 boot drwxr-xr-x 15 root root 2940 Oct 30 19:04 dev drwxr-xr-x 61 root root 4096 Oct 30 19:04 etc drwxr-xr-x 2 root root 4096 Aug 25 00:20 home lrwxrwxrwx 1 root root 41 Oct 29 06:50 initrd.img -> boot/initrd.img-6.12.43+deb13-cloud-amd64 lrwxrwxrwx 1 root root 41 Oct 29 06:50 initrd.img.old -> boot/initrd.img-6.12.43+deb13-cloud-amd64 lrwxrwxrwx 1 root root 7 Oct 29 06:47 lib -> usr/lib lrwxrwxrwx 1 root root 9 Oct 29 06:47 lib64 -> usr/lib64 drwx------ 2 root root 16384 Oct 29 06:47 lost+found drwxr-xr-x 2 root root 4096 Oct 29 06:47 media drwxr-xr-x 2 root root 4096 Oct 29 06:48 mnt drwxr-xr-x 2 root root 4096 Oct 29 06:48 opt dr-xr-xr-x 150 root root 0 Oct 30 19:04 proc drwx------ 3 root root 4096 Oct 29 06:48 root drwxr-xr-x 19 root root 520 Oct 30 19:05 run lrwxrwxrwx 1 root root 8 Oct 29 06:47 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 Oct 29 06:48 srv dr-xr-xr-x 13 root root 0 Oct 30 19:11 sys drwxrwxrwt 7 root root 140 Oct 30 19:04 tmp drwxr-xr-x 12 root root 4096 Oct 29 06:48 usr drwxr-xr-x 11 root root 4096 Oct 30 19:04 var lrwxrwxrwx 1 root root 38 Oct 29 06:50 vmlinuz -> boot/vmlinuz-6.12.43+deb13-cloud-amd64 lrwxrwxrwx 1 root root 38 Oct 29 06:50 vmlinuz.old -> boot/vmlinuz-6.12.43+deb13-cloud-amd64 root@localhost:/# passwd New password: Retype new password: passwd: password updated successfully`

ssh [email protected] Permission denied, please try again

root@localhost:/# apt install curl Installing:
curl

Installing dependencies: bash-completion libcurl4t64 libgnutls30t64 libldap2 libnghttp3-9 libpsl5t64 libsasl2-2 libsasl2-modules-db libtasn1-6 ca-certificates libffi8 libldap-common libnghttp2-14 libp11-kit0 librtmp1 libsasl2-modules libssh2-1t64 publicsuffix

Suggested packages: gnutls-bin libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql

Summary: Upgrading: 0, Installing: 19, Removing: 0, Not Upgrading: 1 Download size: 0 B / 4,278 kB Space needed: 12.6 MB / 98.9 GB available

Continue? [Y/n] Y Preconfiguring packages ... dpkg: warning: 'start-stop-daemon' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin Error: Sub-process /usr/bin/dpkg returned an error code (2) root@localhost:/# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin root@localhost:/#

tortoise4race avatar Oct 30 '25 11:10 tortoise4race

check if /etc/ssh/sshd_config.d/01-permitrootlogin.conf exists if not, create one. contents are PermitRootLogin yes

then run systemctl restart sshd you can login via ssh

bin456789 avatar Oct 30 '25 13:10 bin456789

check if /etc/ssh/sshd_config.d/01-permitrootlogin.conf exists if not, create one. contents are PermitRootLogin yes

then run systemctl restart sshd you can login via ssh

I was no longer able to follow the instructions. The VM had to be restarted for the neu cloud shell connecton. After that, it immediately ended up in GRUB.

==============================================

SecureBoot: Disabled
Boot Options:               GNU GRUB  version 2.12-9
   Boot0006: debian  <HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi>
   Minimal BASH-like line editing is supported. For the first word, TAB   ,0x1)>
   lists possible command completions. Anywhere else TAB lists possible   /FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)>
   device or file completions. To enable less(1)-like paging, "set        
   pager=1".                                                              51,0x800,0x32000)/\EFI\debian\shimx64.efi
Starting Boot0006 "debian" from HD(1,GPT,E67D4824-2B78-45FD-AD91-8572DADC1F51,0x800,0x32000)/\EFI\debian\shimx64.efi
grub> ls configfile (hd0,gpt2)/
lost+found/ boot/ etc/ media/ vmlinuz.old var/ usr/ dev/ home/ proc/ root/ run/
sys/ tmp/ bin lib lib64 sbin mnt/ srv/ opt/ initrd.img.old vmlinuz initrd.img 
grub> ls configfile (hd0,gpt2)/boot/grub/
unicode.pf2 x86_64-efi/ locale/ fonts/ grubenv grub.cfg 
grub> 

==============================================

The configfile (hd0,gpt2)/boot/grub/grub.cfg.new was changed to grub.cfg

configfile (hd0,gpt2)/boot/grub/grub.cfg returns to grub.

tortoise4race avatar Oct 30 '25 15:10 tortoise4race

use netboot.xyz to install a new system https://3dm.pw/archives/oraclearmnetboot

bin456789 avatar Oct 30 '25 15:10 bin456789

Thank you for the instructions. I am following the method described at https://3dm.pw/archives/oracledd.

Due to an error in the OCI EFI, the TFTP download did not work. Firewall port UDP 69 is open.

FS0:\> tftp 141.145.221.202 amd.efi Unable to get the size of the file 'amd.efi' on 'eth0' - Time out FS0:\>

tortoise4race avatar Oct 31 '25 11:10 tortoise4race