Linux系统制作 Ubuntu Server 24.04 启动U盘详细教程

⚠️ 极高风险提醒 :dd命令直接裸写块设备,务必确认 U 盘设备名 ,一旦写错会直接物理销毁服务器硬盘全部数据!!! U 盘容量最低要求 8GB,U 盘内全部数据会被清空。

镜像文件名:ubuntu-24.04.4-live-server-amd64.iso(Server 版本,不要下载 desktop 桌面版)

1.下载官方镜像 + 校验完整性

bash 复制代码
# 下载镜像
wget https://releases.ubuntu.com/24.04/ubuntu-24.04.4-live-server-amd64.iso
# 下载校验文件
wget https://releases.ubuntu.com/24.04/SHA256SUMS
# 校验,输出OK代表镜像完整
[root@node2 ~]# sha256sum -c SHA256SUMS --ignore-missing
sha256sum: unrecognized option '--ignore-missing'
Try 'sha256sum --help' for more information.
[root@node2 ~]# sha256sum -c SHA256SUMS
sha256sum: ubuntu-24.04.3-desktop-amd64.iso: No such file or directory
ubuntu-24.04.3-desktop-amd64.iso: FAILED open or read
sha256sum: ubuntu-24.04.3-live-server-amd64.iso: No such file or directory
ubuntu-24.04.3-live-server-amd64.iso: FAILED open or read
sha256sum: ubuntu-24.04.3-wsl-amd64.wsl: No such file or directory
ubuntu-24.04.3-wsl-amd64.wsl: FAILED open or read
sha256sum: ubuntu-24.04.4-desktop-amd64.iso: No such file or directory
ubuntu-24.04.4-desktop-amd64.iso: FAILED open or read
ubuntu-24.04.4-live-server-amd64.iso: OK
sha256sum: ubuntu-24.04.4-wsl-amd64.wsl: No such file or directory
ubuntu-24.04.4-wsl-amd64.wsl: FAILED open or read
sha256sum: WARNING: 5 listed files could not be read

输出ubuntu‑24.04.4‑live‑server‑amd64.iso: OK才可以继续,FAILED 必须重新下载镜像。

2.卸载 U 盘所有挂载分区

如果 U 盘自动挂载,必须全部卸载,否则 dd 报错资源忙,写出来的 U 盘无法启动。

bash 复制代码
umount /dev/sdb

将sdb替换为你自己识别到的 U 盘设备名。提示not mounted说明已经卸载完毕,无需处理。

3.dd 写入镜像到 U 盘

写入前切勿忘记备份U盘内容,写入时会格式化清理U盘数据!手动格式化U盘请参阅:Linux系统格式化U盘教程-CSDN博客

bash 复制代码
[root@node2 ~]# dd if=./ubuntu-24.04.4-live-server-amd64.iso of=/dev/sdb bs=4M status=progress conv=fsync
2466250752 bytes (2.5 GB) copied, 1.000113 s, 2.5 GB/s

811+1 records in
811+1 records out
3405469696 bytes (3.4 GB) copied, 570.765 s, 6.0 MB/s

参数解释:

  • if= 输入:本地 iso 镜像路径
  • of= 输出:完整 U 盘设备,不带分区数字
  • bs=4M:块大小,加快写入速度
  • status=progress:实时显示写入进度
  • conv=fsync:全部数据写完后强制刷写到 U 盘硬件,防止缓存未落盘直接拔盘损坏介质

命令行提示符返回,代表写入完成。

4.安全拔出 U 盘

不要写完立刻直接拔 U 盘! sync 确保操作系统缓存全部写入 U 盘硬件。

bash 复制代码
sync
# 确认无IO之后再拔U盘
sudo eject /dev/sdb
相关推荐
Lucky_Turtle13 分钟前
【Linux】ip命令,路由表相关配置
linux·运维·tcp/ip
360智汇云21 分钟前
隔离VPC标准路径:出公网链路的设计与实现
android·服务器·数据库
dawnsky.liu26 分钟前
在 RHEL 中使用 goose 实现主机运维
linux·运维·aiops
非凡ghost38 分钟前
Photo Supreme:专业高效的照片收藏管理专家
服务器·前端·人工智能·电脑·软件需求
碧海银沙音频科技研究院39 分钟前
基于炬芯ATS308X的BLE 无线方式离线日志传输导出功能实现
java·linux·服务器
gz927cool1 小时前
在 Harness 上搭建 Agent-Native 应用:可迁移经验
服务器·人工智能·ai·系统架构
kkkkkkkkkk_Z1 小时前
新手自学嵌入式 | 学习日记: Linux驱动进阶 —— Platform总线与I2C子系统实战
linux·运维·学习
Android系统攻城狮1 小时前
Linux Gstreamer深度解析之gst_audio_aggregator_set_sink_caps调用流程与实战(九十一)
linux·运维·服务器·gstreamer音视频·音视频进阶
‎ദ്ദിᵔ.˛.ᵔ₎1 小时前
Linux线程:this指针在pthread中的解决方案
linux
tedcloud1231 小时前
Docker Compose 部署 Memos:从安装到备份恢复
linux·开发语言·jvm·后端·docker·容器·rust