Gelöst: LINBO-Update: Ubuntu sagt: No root device

Nach einem Update vom Linuxmuster Server und neuem Linbo lädt der Ubuntu Client nur in die Initial Ramdisk und sagt no rootfs= parameter.

Wenn man den Bootloader repariert, funktioniert es, bis man Linbo startet und sich Linbo wieder einpflanzt.

Hallo highTower,

welche linboversion ist den nun drauf?
Wie sieht den die start.conf der betroffenen Gruppe aus?
Sind alle Clients betroffen oder nur eine Gruppe?
Der Inhalt der /srv/linbo/boot/grub/.cfg wäre auch noch notwendig.

LG

Holger

Linboversion: 2.4.3-4

Wir haben derzeit erst zwei Testmaschinen am laufen. Es sind die Gruppen test und uefi-test.

root@srv:/srv/linbo# cat start.conf.test
[LINBO]
Server = 10.0.0.1
Group = test
Cache = /dev/sda2
RootTimeout = 600
AutoPartition = no
AutoFormat = no
AutoInitCache = no
DownloadType = torrent
BackgroundFontColor = white
ConsoleFontColorStdout = lightgreen
ConsoleFontColorStderr = orange
SystemType = bios64
KernelOptions = quiet splash

[Partition]
Dev = /dev/sda1
Label = ubuntu
Size = 30G
Id = 83
FSType = ext4
Bootable = yes

[Partition]
Dev = /dev/sda2
Label = cache
Size = 30G
Id = 83
FSType = ext4
Bootable = yes

[Partition]
Dev = /dev/sda3
Label = swap
Size = 8G
Id = 82
FSType = swap
Bootable = no

[Partition]
Label = data
Dev = /dev/sda4
Size =
Id = 83
FSType = ext4
Bootable = no

[OS]
Name = Ubuntu
Version =
Description = Ubuntu 18.04
IconName = ubuntu.png
Image =
BaseImage = ubuntu.cloop
Boot = /dev/sda1
Root = /dev/sda1
Kernel = vmlinuz
Initrd = initrd.img
Append = ro splash
StartEnabled = yes
SyncEnabled = yes
NewEnabled = yes
Autostart = no
AutostartTimeout = 5
DefaultAction = sync
RestoreOpsiState = no
ForceOpsiSetup =
Hidden = yes

Und:

root@srv:/srv/linbo/boot/grub# cat grub.cfg
#
# default grub.cfg, pxe boot version (placed on server, don't edit!)
# thomas@linuxmuster.net
# 20210202
#

set timeout=0

set prefix=/boot/grub
set netroot="(tftp)"

# one menu entry does it all
menuentry 'Default' {

 # look for reboot grubenv pipe on server and execute it if present
 set remote_grubenv=$prefix/spool/${net_pxe_hostname}.reboot
 if [ -s "$remote_grubenv" ]; then
  echo -n Loading remote grub environment ...
  load_env -f "$remote_grubenv"
 fi

 # if grub reboot variable is not set from server
 if [ -z "$reboot_grub" ]; then

  # look for it on cache partition
  if search --set root --file /start.conf; then

   # save local root in variable
   set localroot="${root}"

   # read grub environment variables
   if [ -s /boot/grub/grubenv ]; then
    echo -n Loading local grub environment ...
    load_env
    set localboot=yes
    echo
   fi

  else
   clear
  fi

 fi

 # if reboot is set try to load the os on the given partition
 if [ -n "${reboot_label}" ]; then
  search --label "$reboot_label" --set tmproot
 fi
 if [ -n "${reboot_grub}" -a -z "${tmproot}" ]; then
  set tmproot="${reboot_grub}"
 fi

 if [ -n "${tmproot}" ]; then
  terminal_output console
  echo Booting operating system ...
  echo

  if [ "$localboot" ]; then
   set reboot_grub=""
   set reboot_label=""
   save_env reboot_grub
   save_env reboot_label
  fi
  set root="${tmproot}"
  set win_efiloader="/EFI/Microsoft/Boot/bootmgfw.efi"

  if [ -e "$reboot_kernel" -a -e "$reboot_initrd" ]; then
   linux $reboot_kernel $reboot_append
   initrd $reboot_initrd
   boot
  elif [ -e /boot/vmlinuz -a -e /boot/initrd.img ]; then
   linux /boot/vmlinuz $reboot_append
   initrd /boot/initrd.img
   boot
  elif [ -e /boot/vmlinuz -a -e /boot/initrd ]; then
   linux /boot/vmlinuz $reboot_append
   initrd /boot/initrd
   boot
  elif [ -e /vmlinuz -a -e /initrd.img ]; then
   linux /vmlinuz $reboot_append
   initrd /initrd.img
   boot
  elif [ -e /vmlinuz -a -e /initrd ]; then
   linux /vmlinuz $reboot_append
   initrd /initrd
   boot
  elif [ -s /boot/grub/grub.cfg ] ; then
   configfile /boot/grub/grub.cfg
  elif [ "$grub_platform" = "pc" ]; then
   if [ -s /bootmgr ] ; then
    ntldr /bootmgr
    boot
   elif [ -s /ntldr ] ; then
    ntldr /ntldr
    boot
   elif [ -s /grldr ] ; then
    ntldr /grldr
    boot
   else
    chainloader +1
    boot
   fi
  elif [ -e "$win_efiloader" ]; then
   chainloader $win_efiloader
   boot
  fi

 fi

 # finally fallback to netboot if previous boot methods were not successful
 set root="${netroot}"

 # compute path to group specific config
 if [ "$grub_platform" = "efi" ]; then
  if [ -n "$net_efinet0_extensionspath" ]; then
   set group="$net_efinet0_extensionspath"
   set net_pxe_hostname="$net_efinet0_hostname"
  elif [ -n "$net_efinet1_extensionspath" ]; then
   set group="$net_efinet1_extensionspath"
   set net_pxe_hostname="$net_efinet1_hostname"
  elif [ -n "$net_efinet2_extensionspath" ]; then
   set group="$net_efinet2_extensionspath"
   set net_pxe_hostname="$net_efinet2_hostname"
  fi
 else
  set group="$net_pxe_extensionspath"
 fi
 set groupcfg="$prefix/${group}.cfg"
 set hostcfg="$prefix/hostcfg/${net_pxe_hostname}.cfg"

 # try host specific config from server and boot it if exists
 configfile $hostcfg

 # try group specific config from server and boot it if exists
 configfile $groupcfg

 # try local boot in the other case
 if [ -n "$localroot" ]; then
  set root="${localroot}"
  # load local custom.cfg if present
  set customcfg=$prefix/custom.cfg
  if [ -s "$customcfg" ]; then
   configfile $customcfg
  fi
 fi

 # finally try netboot linbo directly in failsafe mode
 set root="${netroot}"
 set gfxpayload=640x480x16

 # 32bit pae, non pae or 64bit kernel
 if cpuid -l; then
  set linbo_kernel=/linbo64
  set linbo_initrd=/linbofs64.lz
 elif cpuid -p; then
  set linbo_kernel=/linbo
  set linbo_initrd=/linbofs.lz
 else
  set linbo_kernel=/linbo-np
  set linbo_initrd=/linbofs-np.lz
 fi
 echo "LINBO netboot in failsafe mode"
 echo -n "Loading $linbo_kernel .."
 linux $linbo_kernel quiet netboot
 echo
 echo -n "Loading $linbo_initrd .."
 initrd $linbo_initrd
 boot
}

Hallo highTower,

das war die falsche grub.cfg.
Ich benötige die, die <gruppe>.cfg heißt.
Die spitzen Klammern wurden von Discourse geschluckt …

LG

Holger

Ah Sorry

root@srv:/srv/linbo# cat boot/grub/test.cfg
# global part of group specific grub.cfg template for linbo net boot
# thomas@linuxmuster.net
# 20210202
#

# if you don't want this file being overwritten by import_workstations remove the following line:
# ### managed by linuxmuster.net ###

# edit to your needs
set default=0
set timeout=0
set fallback=1

set gfxmode=auto
set gfxpayload=keep

insmod all_video
insmod png
insmod gfxterm
insmod gfxmenu
insmod minicmd
insmod progress

terminal_output gfxterm

background_color 42,68,87

# 32bit pae, non pae or 64bit kernel
if cpuid -l; then
 set linbo_kernel=/linbo64
 set linbo_initrd=/linbofs64.lz
elif cpuid -p; then
 set linbo_kernel=/linbo
 set linbo_initrd=/linbofs.lz
else
 set linbo_kernel=/linbo-np
 set linbo_initrd=/linbofs-np.lz
fi

# theme settings (modify for custom theme)
set theme=/boot/grub/themes/linbo/theme.txt
export theme

clear

# find linbo cache partition
set cachelabel="cache"
if [ -n "$cachelabel" ]; then
  search --label "$cachelabel" --set cacheroot
fi
if [ -z "$cacheroot" ]; then
  search --file /start.conf --set cacheroot
fi
if [ -z "$cacheroot" ]; then
  search --file "$linbo_initrd" --set cacheroot
fi
if [ -n "$cacheroot" ]; then
  set root="$cacheroot"
else
  set root="(hd0,2)"
fi

# linbo part, boot local or net (default #0)
menuentry 'LINBO' --class linbo {

 echo LINBO $bootflag for group test
 echo

 if [ -e "$linbo_kernel" -a -e "$linbo_initrd" ]; then
  set bootflag=localboot
 elif [ -n "$pxe_default_server" ]; then
  set root="(tftp)"
  set bootflag=netboot
 fi

 if [ -n "$bootflag" ]; then
  echo -n "Loading $linbo_kernel ..."
  linux $linbo_kernel quiet splash $bootflag
  echo
  echo -n "Loading $linbo_initrd ..."
  initrd $linbo_initrd
  boot
 else
  if [ "$grub_platform" = "pc" ]; then
   set ipxe="/ipxe.lkrn"
  fi
  if [ -e "$ipxe" ]; then
   echo -n "Initiating pxe boot ..."
   linux16 $ipxe dhcp
   boot
  fi
 fi

}
# group specific grub.cfg template for linbo net boot, should work with linux and windows operating systems
# thomas@linuxmuster.net
# 20201126
#

# start "Ubuntu" directly
menuentry 'Ubuntu (Start)' --class ubuntu_start {

 set oslabel="ubuntu"
 if [ -n "$oslabel" ]; then
  search --label "$oslabel" --set osroot
 fi
 if [ -n "$osroot" ]; then
  set root="$osroot"
 else
  set root="(hd0,1)"
 fi
 set win_efiloader="/EFI/Microsoft/Boot/bootmgfw.efi"

 terminal_output console
 if [ -e /boot/vmlinuz -a -e /boot/initrd.img ]; then
  linux /boot/vmlinuz ro splash root=/dev/sda1
  initrd /boot/initrd.img
 elif [ -e /vmlinuz -a -e /initrd.img ]; then
  linux /vmlinuz ro splash root=/dev/sda1
  initrd /initrd.img
 elif [ -e /boot/vmlinuz -a -e /boot/initrd ]; then
  linux /boot/vmlinuz ro splash root=/dev/sda1
  initrd /boot/initrd
 elif [ -e /vmlinuz -a -e /initrd ]; then
  linux /vmlinuz ro splash root=/dev/sda1
  initrd /initrd
 elif [ -e /vmlinuz -a -e /initrd.img ]; then
  linux /vmlinuz ro splash root=/dev/sda1
  initrd /initrd.img
 elif [ -e /vmlinuz ]; then
  linux /vmlinuz ro splash root=/dev/sda1
 elif [ -s /boot/grub/grub.cfg ] ; then
  configfile /boot/grub/grub.cfg
 elif [ "$grub_platform" = "pc" ]; then
  if [ -s /bootmgr ] ; then
   ntldr /bootmgr
  elif [ -s /ntldr ] ; then
   ntldr /ntldr
  elif [ -s /grldr ] ; then
   ntldr /grldr
  else
   chainloader +1
  fi
 elif [ -e "$win_efiloader" ]; then
  chainloader $win_efiloader
  boot
 fi
 terminal_output gfxterm

}

# boot LINBO and start "Ubuntu"
menuentry 'Ubuntu (Linbo-Start)' --class ubuntu_start {

 if [ -e "$linbo_kernel" -a -e "$linbo_initrd" ]; then
  set bootflag=localboot
 elif [ -n "$pxe_default_server" ]; then
  set root="(tftp)"
  set bootflag=netboot
 fi

 if [ -n "$bootflag" ]; then
  echo LINBO $bootflag for group test
  echo
  echo -n "Loading $linbo_kernel ..."
  linux $linbo_kernel quiet splash linbocmd=start:1 $bootflag
  echo
  echo -n "Loading $linbo_initrd ..."
  initrd $linbo_initrd
  boot
 fi

}

# boot LINBO, sync and start "Ubuntu"
menuentry 'Ubuntu (Sync+Start)' --class ubuntu_syncstart {

 if [ -e "$linbo_kernel" -a -e "$linbo_initrd" ]; then
  set bootflag=localboot
 elif [ -n "$pxe_default_server" ]; then
  set root="(tftp)"
  set bootflag=netboot
 fi

 if [ -n "$bootflag" ]; then
  echo LINBO $bootflag for group test
  echo
  echo -n "Loading $linbo_kernel ..."
  linux $linbo_kernel quiet splash linbocmd=sync:1,start:1 $bootflag
  echo
  echo -n "Loading $linbo_initrd ..."
  initrd $linbo_initrd
  boot
 fi

}

# boot LINBO, format os partition, sync and start "Ubuntu"
menuentry 'Ubuntu (Neu+Start)' --class ubuntu_newstart {

 if [ -e "$linbo_kernel" -a -e "$linbo_initrd" ]; then
  set bootflag=localboot
 elif [ -n "$pxe_default_server" ]; then
  set root="(tftp)"
  set bootflag=netboot
 fi

 if [ -n "$bootflag" ]; then
  echo LINBO $bootflag for group test
  echo
  echo -n "Loading $linbo_kernel ..."
  linux $linbo_kernel quiet splash linbocmd=format:1,sync:1,start:1 $bootflag
  echo
  echo -n "Loading $linbo_initrd ..."
  initrd $linbo_initrd
  boot
 fi

}

Das Ubuntu-Original sieht so aus:

Folgendes erscheint dann in der /var/log/linuxmuster/linbo/n182-virtuell_linbo.log:

[Info] Executing asynchronos: linbo_cmd start /dev/sda1 /dev/sda1 vmlinuz initrd.img ro splash /dev/sda2
[StdOut] start
[StdOut] 1: ?/dev/sda1? 2: ?/dev/sda1? 3: ?vmlinuz? 4: ?initrd.img? 5: ?ro splash? 6: ?/dev/sda2?
[StdOut] Kernel vmlinuz auf Partition /dev/sda1 nicht vorhanden. Setze auf "auto".
Schreibe Reboot-Informationen nach /cache/boot/grub/grubenv.
[StdOut] Schreibe Reboot-Informationen nach /cache/boot/grub/grubenv.
[StdOut] Setting machine password on 10.0.0.1 ...
[StdOut] Veranlasse Upload von linbo.log.

Wir haben die start.conf-… auf folgendes geändert:

Problem gelöst!

Kernel = /boot/vmlinuz
Initrd = /boot/initrd.img
1 „Gefällt mir“

Hallo highTower,

… bin jetzt erst zurück.
Sowas hatten wir vor vielen Jahren schonmal: bei ubuntu 9.04 oder 10.04 … weiß nicht mehr.
Da wurde der link aus /boot heraus für den Kernel und die initrd nicht mehr angelegt.
Wir haben damals den link angelegt, dann ging es wieder.

Aber du hast ja eine Lösung gefunden.

LG

Holger