帮助:Ubuntu 20.04 LTS 桌面安装失败,未加载 ks.cfg 文件

帮助:Ubuntu 20.04 LTS 桌面安装失败,未加载 ks.cfg 文件

我正在寻找 Ubuntu 20.04 LTS DESKTOP 自动安装?我使用 ubuntu 20.04 lts 桌面 iso 在 USB KEY 上启动,我不想使用自动脚本在 ssd 电脑上安装(不是实时安装)

我在互联网上找到了 grub.cfg 文件中的一个很好的例子(并且有效):

linux /casper/vmlinuz file=/cdrom/ks.preseed auto=true priority=critical debian-installer/locale=fr_FR keyboard-configuration/layoutcode=fr ubiquity/reboot=true languagechooser/language-name=French countrychooser/shortlist=FR localechooser/supported-locales=fr_FR.UTF-8 boot=casper automatic-ubiquity initrd=/casper/initrd.lz quiet splash noprompt noshell ---

但就我而言,我没有编写用于创建分区、创建用户、使用 luks(cryptsetup)加密磁盘和安装包软件的脚本,我使用以下命令进行测试:

`linux  /casper/vmlinuz  file=/cdrom/preseed/ks.seed initrd=/install/initrd.gz boot=casper automatic-ubiquity ks=hd:sda1:/ks.cfg quiet splash noprompt noshell ---`

启动没问题,但无法加载 ks.cfg,我使用 hd:sda1:、cdrom: 等进行了测试,http 均未加载,全部不起作用 :(

你见过这个问题吗?如何解决?因为我很困惑

非常感谢您提供解决方案?请问我的错误在哪里?

我的代码:

grub配置文件

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

set timeout=5
menuentry "Ubuntu Automatique" {
    set gfxpayload=keep
    linux  /casper/vmlinuz  initrd=/install/initrd.gz boot=casper ks=cdrom:/ks.cfg quiet noprompt noshell ---
  #linux /casper/vmlinuz  ks=$root/ks.cfg file=/cdrom/ks.preseed boot=casper automatic-ubiquity quiet splash noprompt noshell ---
  #linux /casper/vmlinuz  file=/cdrom/ks.preseed auto=true priority=critical debian-installer/locale=fr_FR keyboard-configuration/layoutcode=fr ubiquity/reboot=true languagechooser/language-name=French countrychooser/shortlist=FR localechooser/supported-locales=fr_FR.UTF-8 boot=casper automatic-ubiquity initrd=/casper/initrd.lz quiet splash noprompt noshell ---
    initrd  /casper/initrd
}
menuentry "Ubuntu" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
    initrd  /casper/initrd
}
menuentry "Ubuntu (safe graphics)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash nomodeset ---
    initrd  /casper/initrd
}
menuentry "OEM install (for manufacturers)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed only-ubiquity quiet splash oem-config/enable=true ---
    initrd  /casper/initrd
}
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'Boot from next volume' {
    exit
}
menuentry 'UEFI Firmware Settings' {
    fwsetup
}
fi 

配置文件

default install
label install
  menu label ^Try Ubuntu Auto
  cat hd:LABEL=$VOLUMELABEL:/ks.cfg
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/ks.preseed boot=casper automatic-ubiquity auto=true quiet splash noprompt noshell ---
label live
  menu label ^Try Ubuntu without installing
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash ---
label live-install
  menu label ^Install Ubuntu
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash ---
label check
  menu label ^Check disc for defects
  kernel /casper/vmlinuz.efi
  append  boot=casper integrity-check initrd=/casper/initrd.lz quiet splash ---
label memtest
  menu label Test ^memory
  kernel /install/mt86plus
label hd 
  menu label ^Boot from first hard disk
  localboot 0x80

isolinux配置文件

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path 
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
ui gfxboot bootlogo

ks配置文件

# Script Kickstart pour installation automatisée
# Langue à utiliser pour l'installation et le système
lang fr_FR
 
# Modules de langue à installer
langsupport fr_FR
 
# Clavier
keyboard fr
 
# Souris
mouse
 
# Fuseau horaire
timezone --utc Europe/Paris
 
# Mot de passe Root (pas de mot de passe pour root par défaut sous Ubuntu)
rootpw --disabled
 
# Utilisateur de départ - config en section %pre
%include /tmp/user_conf
 
# Redémarrage après installation si demandé - config en section pre%
%include /tmp/reboot_conf
 
# Installation en mode texte
text
 
# Installation de l'OS plutôt que mise à jour
install
 
# Configuration du chargeur de démarrage
bootloader --location=mbr
 
# Destruction des tables de partitions invalides
zerombr yes
 
# Supression puis définition des partitions si demandé
%include /tmp/part_conf
 
# Définition des options d'authentification pour le système
auth  --useshadow  --enablemd5
 
# Configuration du réseau
%include /tmp/network_conf
 
# Configuration du pare-feu
firewall --disabled
 
# Ne pas configurer X pour le système
skipx

相关内容