全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2308|回复: 26
打印 上一主题 下一主题

修改萌咖 DD 脚本默认文件系统

[复制链接]
跳转到指定楼层
1#
发表于 2022-5-5 20:05:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
仅适用于 debian 和 ubuntu,只需要在脚本的 preseed.cfg 里加一句:

  1. d-i partman/default_filesystem string btrfs
复制代码


就可以把根目录的文件系统改成 btrfs,同理可以改成 xfs 什么的。


我加的具体位置:

  1. d-i partman/default_filesystem string btrfs
  2. d-i partman-partitioning/confirm_write_new_label boolean true
  3. d-i partman/mount_style select uuid
  4. d-i partman/choose_partition select finish
复制代码
推荐
 楼主| 发表于 2022-5-5 21:02:55 | 只看该作者
菜单 发表于 2022-5-5 20:40
我就找到这个,debian 11的。但我如果想d其他系统,我就不知道咋弄了

debian:
-d 11

ubuntu:
-u 20.04

cent:
-c 7
2#
发表于 2022-5-5 20:05:57 | 只看该作者
谢谢分享技术贴
3#
发表于 2022-5-5 20:17:21 | 只看该作者
萌咖脚本会创建大约内存大小的swap,修改哪里能去掉这个设置
4#
发表于 2022-5-5 20:19:39 | 只看该作者
支持技术贴!
Tip 该用户已被删除
5#
发表于 2022-5-5 20:21:30 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
6#
发表于 2022-5-5 20:22:33 | 只看该作者
能不能给我说下,这个脚本各种参数怎么设置的?
比如怎么选系统,设置密码,改端口,一气呵成。
完整的。
7#
发表于 2022-5-5 20:27:06 | 只看该作者
ken08 发表于 2022-5-5 20:17
萌咖脚本会创建大约内存大小的swap,修改哪里能去掉这个设置

同样是那个位置添加分区,下面代码供参考:
  1. d-i partman-auto/disk string
  2. d-i partman-auto/method string regular
  3. d-i partman-auto/expert_recipe string         \
  4.    boot-root ::                               \
  5.       40 50 200 ext4                          \
  6.          $primary{ } $bootable{ }             \
  7.          method{ format } format{ }           \
  8.          use_filesystem{ } filesystem{ ext4 } \
  9.          mountpoint{ /boot } .                \
  10.       500 1000 -1 ext4                        \
  11.          $primary{ }                          \
  12.          method{ format } format{ }           \
  13.          use_filesystem{ } filesystem{ ext4 } \
  14.          mountpoint{ / } .                    \
  15.       64 512 200% linux-swap                  \
  16.          method{ swap } format{ } .
  17. d-i partman-partitioning/confirm_write_new_label boolean true
  18. d-i partman-auto/choose_recipe select boot-root
  19. d-i partman/choose_partition select finish
  20. d-i partman/confirm boolean true
  21. d-i partman/confirm_nooverwrite boolean true
  22. d-i partman/default_filesystem string ext4
  23. d-i partman/mount_style select uuid
复制代码
8#
 楼主| 发表于 2022-5-5 20:30:35 | 只看该作者
ken08 发表于 2022-5-5 20:17
萌咖脚本会创建大约内存大小的swap,修改哪里能去掉这个设置

修改 swap 就不是一两行的事了,要改的话也就是 partman 这块地方了。
9#
发表于 2022-5-5 20:32:02 | 只看该作者
ken08 发表于 2022-5-5 20:17
萌咖脚本会创建大约内存大小的swap,修改哪里能去掉这个设置

https://superuser.com/questions/458672/ubuntu-preseed-use-whole-disk-space-but-no-swap
  1. d-i partman-basicfilesystems/no_swap boolean false
  2. d-i partman-auto/expert_recipe string myroot :: 1000 50 -1 ext4 \
  3.      $primary{ } $bootable{ } method{ format } \
  4.      format{ } use_filesystem{ } filesystem{ ext4 } \
  5.      mountpoint{ / } \
  6.     .
  7. d-i partman-auto/choose_recipe select myroot
复制代码

  1. d-i partman-basicfilesystems/no_swap boolean false -- 禁止警告消息
复制代码

  1. d-i partman-auto/expert_recipe string myroot :: 1000 50 -1 ext4 ... 至少1G的分区
复制代码
10#
发表于 2022-5-5 20:35:10 | 只看该作者
菜单 发表于 2022-5-5 20:22
能不能给我说下,这个脚本各种参数怎么设置的?
比如怎么选系统,设置密码,改端口,一气呵成。
完整的。 ...

DebianInstallerPreseed
https://wiki.debian.org/DebianInstaller/Preseed

Contents of the preconfiguration file (for bullseye)
https://www.debian.org/releases/stable/amd64/apbs04.en.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-22 00:31 , Processed in 0.063818 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表