标签 ubuntu 下的文章

ubuntu 24.04 - pxe 安装 - unable to find a live file system on the network - 要用和iso文件匹配版本的 vmlinuz 和 initrd

问题:客户要求安装 ubuntu 24.04。我偷懒,直接复制原 ubuntu 22.04 的目录,然后替换其中的 iso 文件。实机操作提示出错,unable to find a live file system on the network , BusyBox initramfs。

尝试:需要从新版本iso文件casper目录中提出 vmlinuz 和 initrd 文件,替换旧版本的,因为两者要匹配,否则会报错。

参考:https://unix.stackexchange.com/questions/633218/unable-to-find-a-live-file-system-on-the-network-pxe-boot-ubuntu-from-centos

ubuntu 22.04 - jammy - autoinstall - pxe 自动安装

上一篇,测试了 debian 11 的pxe自动安装:https://liujia.anqun.org/index.php/archives/3994/ 。 这里想试试 ubuntu 22.04的。

  1. /srv/tftp/os-images/bullseye/netboot/pxelinux.cfg/01-08-00-27-49-b4-6c # 偷懒,直接使用 debian 11 netboot 中的 pxelinux 文件。仅对pxelinux的配置文件内容做改动。其中 vmlinuz 和 initrd 是从 ubuntu-22.04.1-live-server-amd64.iso 提取到的。http://192.168.3.1/jammy/ 中有 user-data 和 meta-data 配置文件

    DEFAULT linux
     SAY Now booting the kernel from SYSLINUX...
    LABEL linux
    #  KERNEL debian-installer/amd64/linux
    #  APPEND auto=true hostname=auto2 domain=local preseed/url=tftp://192.168.3.1/os-images/bullseye/preseed.cfg initrd=debian-installer/amd64/initrd.gz
    
    KERNEL http://192.168.3.1/jammy/vmlinuz
    INITRD http://192.168.3.1/jammy/initrd
    APPEND ip=dhcp autoinstall ds=nocloud-net;s=http://192.168.3.1/jammy/ url=http://192.168.3.1/jammy/ubuntu-22.04.1-live-server-amd64.iso
  2. http://192.168.3.1/jammy/user-data # 自动安装的应答文件内容,这里仅设置用户及安装openssh-server

    #cloud-config
    autoinstall:
     identity:
    hostname: jammy2
    password: $6$5lpwCLsKLEzMkSJc$keOAhA6aO/5RocGThmhVA7LSNuW911Rx5HHXFEa75oGK20cEdAAgn14H5f5nGeq6QgcSyLPrWcg1.JvjXbhrN/
    username: ubuntu
     locale: zh_CN.UTF-8
     ssh:
    install-server: yes
     late-commands:
     - 'echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /target/etc/sudoers.d/ubuntu-nopw'
     - chmod 440 /target/etc/sudoers.d/ubuntu-nopw
     version: 1

遇到的问题,安装ubuntu 22.04的虚拟机分配了4GB内存,还不够用,用6GB内存后才顺利安装完成。

参考:

ubuntu16.04里安装xrdp

假如,在已安装好lxde桌面及xrdp的ubuntu16上:

  1. ufw allow 3389 # 允许外网访问3389端口
  2. 修改配置文件/etc/xrdp/startwm.sh,将其中的. /etc/X11/Xsession 一行,替换成 lxsession -s Lubuntu -e LXDE
  3. systemctl restart xrdp # 重启xrdp服务
  4. systemctl enable xrdp # 自启动xrdp

参考:

ubuntu 18.04 的远程网络安装相关文件

参考:

在 ubuntu 19 里安装 mysql5.7

环境:ubuntu 19

步骤:

  1. wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.28-1ubuntu19.04_amd64.deb-bundle.tar # 下载.deb的安装包
  2. tar -xvf mysql-server_5.7.28-1ubuntu19.04_amd64.deb-bundle.tar # 解压下载好的安装包
  3. rm -rf mysql-testsuite_5.7.28-1ubuntu19.04_amd64.deb mysql-community-test_5.7.28-1ubuntu19.04_amd64.deb # 删除其中两个用于测试目的的程序
  4. dpkg -i mysql-*.deb # 安装其余的.deb包
  5. apt install libmecab2 # 如安装失败,提示缺 libmecab2 包的话,请补装 libmecab2 后再次安装mysql5.7的.deb包

参考:https://marabesi.com/mysql/2019/12/23/mysql-5.7-on-ubuntu-19.html