安装系统用的iso制作与启动U盘后,是否可以继续往U盘写入文件

我在windows环境中用ultroISO修改debian iso文件,然后把修改过的iso文件记录到U盘,结果U盘是无法启动的U盘,不能用来安装系统~

我在想应该是ultroISO可能需要设置引导方面的选项,后续有机会再测~

权限问题暂时没有机会测,回头再有机会的时候我测试一下~

我在用sudo权限复制时,提示是只读文件系统,看来是不能写入~

可能是刻录程序的问题。你使用什么程序刻录安装U盘?
注意:使用Live ISO刻录的U盘是不可写的,只能通过 persistence 保留其更改。

sudo cp debian.iso /dev/sdd

按手册来的,没使用专门的程序~

如果按照这种方法刻录安装U盘的话,参见
4.3. 为从 U 盘引导准备文件 :

The hybrid image on the stick does not occupy all the storage space, so it may be worth considering using the free space to hold firmware files or packages or any other files of your choice. This could be useful if you have only one stick or just want to keep everything you need on one device.

Create a second, FAT partition on the stick, mount the partition and copy or unpack the firmware onto it.
For example:

# mount /dev/sdX2 /mnt
# cd /mnt
# tar zxvf /path/to/firmware.tar.gz
# cd /
# umount /mnt

You might have written the mini.iso to the USB stick. In this case the second partition doesn’t have to be created as, very nicely, it will already be present. Unplugging and replugging the USB stick should make the two partitions visible.

我试一下,先把u盘分成两个区,然后再写入iso看看~

windows环境下,已经写好的U盘没有空余空间~

启动U盘创建以后,用partitionmanager查看,会提示“在此设备上未找到有效的分区表”;

用sudo cfdisk /dev/sdd,会提示有一个剩余空间,而这个剩余空间的容量等于U盘的全部空间容量
除了这个剩余空间,还有两个分区,一个是3.7G,另一个是2.8M。

这种情况下,好像无法再创建一个新分区,因为创建新分区会破坏这个安装U盘: partitionmanager认为整个U盘是空闲,没有任何分区,连分区表都没有。cfdisk虽然可以看到两个分区,但从空闲空间创建新分区时,已经创建的3.7G分区会被破坏~

如果在windows中用磁盘管理查看,会显示U盘有一个14.75GB未分配空间。而我这个U盘是16G的,所以,也无法创建新分区~

所以,debian 安装手册里的这一段描述,是不是已经过时了~

经过我的实验,虽然分区工具检测不到镜像文件,但是它仍然存在并占据着空间,只要在新建分区时从末端小心地为镜像文件预留空间就能够正常新建分区且这样修改的U盘能够成功引导。我推测这是分区工具不支持ISO9660格式造成的。
@yichuang 如果你使用Windows刻录安装U盘,可以考虑使用Rufus

windows的磁盘管理工具好像不支持预留空间从后端创建分区~

Windows下确实不行,不过Linux上常见的分区工具都支持这么做。在Windows下……使用Rufus看看?

我正在用rufus写u盘,不过好像不支持写到分区,必须写到整个u盘,等写完我看一下结果~

Rufus “ISO模式”的原理似乎是在U盘上新建FAT分区,设置引导选项,然后手动从ISO复制文件,相当于
https://www.debian.org/releases/stable/amd64/ch04s03.zh-cn.html#usb-copy-flexible
给出的方法,不过是由程序自动完成的,所以你应该完全可以在写入完成后新建/firmware目录并复制固件软件包到其中。

写入之前有一个提示,可以选择ISO还是DD,我想这个选项应该可以解决我的问题,就像你说的手动复制ISO文件~

我先试一下ISO,正在写…

以前用arch的时候,一直在用rufus;改成debian后,就一直用debian推荐的win32diskimager~

archwiki有提到需要使用wipefs --all /dev/sdx来删除iso9660文件系统标记,我想这是我之前为什么无法修改卷标的原因~

Rufus作者的意见:

Why doesn’t Rufus recommend DD mode over ISO mode for ISOHybrid images? Surely DD is better!

Congratulations. If you are coming to this FAQ with the idea that DD mode has no drawbacks, then you have drunk the ISOhybrid kool aid, which has been a massive plague for people who are effectively trying to ensure that users can actually create a bootable drive in the best possible condition, without being constrained to the shortcomings of a “one method to rule them all” fallacy.

And here, I hear you protesting: “But dd is a lot faster than copying individual files, and it enables the use of a native Linux file system as well as an ESP, plus it makes sure that the resulting drive is a bit for bit copy of the one created by the person who produced the ISO. How could this not objectively be the better option???”

Well, unfortunately for you, it is very easy to disprove that dd mode is the better option for users (and that’s not even counting the similar reports I get through e-mail). The fact that Windows cannot natively mount the usual Linux partition that follows the ESP is EXCEEDINGLY CONFUSING FOR MANY USERS. So, writing an ISOHybrid in dd mode will usually break the principle of least astonishment, which Linux maintainers, who are less tuned to hearing reports from Windows users, tend to disregard as a non issue, when it most certainly isn’t.

Furthermore, whereas pretty much any OS provides native tools to easily create a FAT32 partition onto a USB drive, and extract ISO content onto it (which, if you have a UEFI system, should be more than enough to create a bootable drive, provided that the image creators did their job properly), so that you shouldn’t even have to use a utility like Rufus, using dd for copying an image requires a little more involvement and, if you are using it manually, can lead to dramatic mishaps (dd is not also called Disk Destroyer by mistake), which are a lot less likely to happen when using file extraction mode.

Oh, and you can of course forget about adding any extra content (such as, say, proprietary Wifi firmware binaries, which you may need to load in order for your platform to have connectivity during installation) or using a bootable drive for data on Windows, if it was written in DD mode. For instance, one can’t simply use DD mode to install a generic Linux distribution on the Raspberry Pi, whereas, when that same distribution supports ISO mode, one can just take the vanilla ISO, add the handful of extra files that are required for Pi boot (which of course would be impossible to accomplish in DD mode) and install that OS in the same manner as you would do on a PC.

Finally, when using GPT as a partition scheme, using dd to write an ISOhybrid image will imediately result in a “broken” drive, on account that the backup GPT table will not be written where it should (in the very last 33 sectors of the drive) unless you use a drive that is the exact same size as the image, which is never ever the case. This means that, should a UEFI firmware be pedantic (and some are!), it may very well choose not to boot the drive altogether, on account that the GPT is broken. So much for DD mode being a panacea!

The above often results in a first time experience, for Windows users who are trying to try or transition to Linux, that can be very subpar and it is very unfortunate, though not entirely surprising, that a lot of Linux maintainers have so far been turning a deaf hear to the plight of said users, by disimissing these issues as something unfamiliar users should just “plow through”, on account of treating ISOHybrids as a mere DD image (which is what the Manjaro and PopOS maintainers currently do) making their own lives so much easier…

Still, because we do believe that Windows users should have the best experience when creating a bootable drive, and not be confronted with something very unexpected that will leave them, at best, inconvenienced, or, at worst, believing that their drive is “broken”, where possible, Rufus will continue to recommend ISO mode over DD mode (while obviously still giving the choice, for users who wish to do so, to write their ISOHybrid in DD mode).

用Rufus创建的U盘,可以向U盘的/firmware目录写入firmware文件;并且,写入firmware文件后,这个U盘能够启动电脑,并且可以正确驱动我的无线网卡~

我好像忽略了一个问题~

https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-dvd/

这个iso直接刻录u盘就可以了,完全不需要我自己拷贝firmware。
这个iso出自 Debian CD team,应该没问题,我试一下看看。

我在这里进行了解释:

漏神了~

考虑过 Ventoy 这个工具没有?可以把 U 盘划几个分区,可以放多个 iso 镜像。也可以放其他文件。

还真不知道这个工具,这几天我试一下~