mirror of
https://github.com/linka-cloud/d2vm.git
synced 2026-01-25 19:15:04 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
2af13ef626
|
|||
|
|
0d4379946b | ||
|
|
e9f3ac9193 |
12
builder.go
12
builder.go
@@ -56,13 +56,13 @@ ff02::3 ip6-allhosts
|
||||
SAY Now booting the kernel from SYSLINUX...
|
||||
LABEL linux
|
||||
KERNEL /boot/vmlinuz-virt
|
||||
APPEND ro root=UUID=%s rootfstype=ext4 initrd=/boot/initramfs-virt console=ttyS0,115200
|
||||
APPEND ro root=UUID=%s rootfstype=ext4 initrd=/boot/initramfs-virt console=ttyS0,115200
|
||||
`
|
||||
syslinuxCfgCentOS = `DEFAULT linux
|
||||
SAY Now booting the kernel from SYSLINUX...
|
||||
LABEL linux
|
||||
KERNEL /boot/vmlinuz
|
||||
APPEND ro root=UUID=%s initrd=/boot/initrd.img net.ifnames=0 console=tty0 console=ttyS0,115200n8
|
||||
APPEND ro root=UUID=%s initrd=/boot/initrd.img net.ifnames=0 console=tty0 console=ttyS0,115200n8
|
||||
`
|
||||
)
|
||||
|
||||
@@ -78,6 +78,8 @@ var (
|
||||
"/usr/share/syslinux/mbr.bin",
|
||||
// centos path
|
||||
"/usr/share/syslinux/mbr.bin",
|
||||
// archlinux path
|
||||
"/usr/lib/syslinux/bios/mbr.bin",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -322,7 +324,11 @@ func (b *builder) installKernel(ctx context.Context) error {
|
||||
var sysconfig string
|
||||
switch b.osRelease.ID {
|
||||
case ReleaseUbuntu:
|
||||
sysconfig = syslinuxCfgUbuntu
|
||||
if b.osRelease.VersionID < "20.04" {
|
||||
sysconfig = syslinuxCfgDebian
|
||||
} else {
|
||||
sysconfig = syslinuxCfgUbuntu
|
||||
}
|
||||
case ReleaseDebian:
|
||||
sysconfig = syslinuxCfgDebian
|
||||
case ReleaseAlpine:
|
||||
|
||||
Reference in New Issue
Block a user