bash genisoimage 脚本不能刻录大于 4GB 但小于 4.5GB 的文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20209263/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
genisoimage script cannot burn bigger than 4GB but less than 4.5GB file?
提问by user275517
I found it strange after running the following script file.
运行以下脚本文件后,我发现它很奇怪。
#! /bin/sh
# krhowto_4
# Path to partition you will work on
PFAD="/media/sda1"
START=$(date +'%s')
# Disable screensaver
xscreensaver-command -exit
# Build new inital RAM-disk
cd $PFAD/knx/minirt/minirtdir/
find . | cpio -oH newc | gzip -9 > ../minirt.gz
cp $PFAD/knx/minirt/minirt.gz $PFAD/knx/master/boot/isolinux/
# Make the big compressed filesystem KNOPPIX
genisoimage -input-charset ISO-8859-15 -R -l -D -V KNOPPIX_FS -quiet \
-no-split-symlink-components -no-split-symlink-fields \
-hide-rr-moved -cache-inodes $PFAD/knx/source/KNOPPIX \
| /usr/sbin/create_compressed_fs -q -B 65536 -t 8 -L 9 \
-f $PFAD/knx/isotemp - $PFAD/knx/master/KNOPPIX/KNOPPIX
# Update the file hashes used by the "testcd" boot option
cd $PFAD/knx/master ; find -type f -not -name \
sha1sums -not -name boot.cat -not \
-name isolinux.bin -exec sha1sum '{}' \; > KNOPPIX/sha1sums
# Create new Knoppix ISO
genisoimage -l -r -J -V "KNOPPIX" \
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -c boot/isolinux/boot.cat \
-o $PFAD/knx/remastered.iso $PFAD/knx/master
# Enable screensaver
su knoppix -c "xscreensaver -nosplash &"
echo -e "\nFinished! Used time: $(expr $(expr $(date +'%s') - $START) / 60) min. \
and $(expr $(expr $(date +'%s') - $START) % 60) sec. \
\n\nThe new ISO is stored in '$PFAD/knx/remastered.iso' "
When the script file run at
当脚本文件运行于
genisoimage -l -r -J -V "KNOPPIX" \
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -c boot/isolinux/boot.cat \
-o $PFAD/knx/remastered.iso $PFAD/knx/master
It display the following error message:
它显示以下错误消息:
I: -input-charset not specified, using utf-8
File /media/sda1/knx/master/KNOPPIX/KNOPPIX is larger than 4GiB-1.
-allow-limited-size was not specified. There is no way to represent this file size. Aborting.
Although I tried with the CD version, it works. but for the DVD version, it failed to generate a ISO file.
尽管我尝试使用 CD 版本,但它确实有效。但是对于 DVD 版本,它无法生成 ISO 文件。
Some website recommend that I used mkisofs
with the parameters -iso-level 3
so that there will be no restriction to the size but are there genisoimage
equivalent command?
一些网站建议我使用mkisofs
参数-iso-level 3
,这样就不会限制大小,但是否有genisoimage
等效的命令?
Thus, would appreciate if anyone can enlighten me how I can use genisoimage
to create the DVD as I suspect that the following command that I have come out with might not work.
因此,如果有人能启发我如何使用genisoimage
来创建 DVD,我将不胜感激,因为我怀疑我提出的以下命令可能不起作用。
genisoimage -input-charset ISO-8859-15 -l -r -J -V "KNOPPIX" \
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-iso-level 3 \
-boot-info-table -c boot/isolinux/boot.cat \
-o $PFAD/knx/remastered.iso $PFAD/knx/master
Added Info: The partition of /media/sda1/ is ext2
.
新增信息:/media/sda1/ 的分区为ext2
.
回答by Bálint Szigeti
mkisofs -allow-limited-size -l -J -r -iso-level 3 -o this command will generate bigger then 4GB ISO.
mkisofs -allow-limited-size -l -J -r -iso-level 3 -o 此命令将生成大于 4GB 的 ISO。
回答by alexmarkoff
Use this command (-iso-level 3 resolve issue):
使用此命令(-iso-level 3 解决问题):
"C:\Program Files (x86)\cdrtools\mkisofs.exe" -r -R -J -l -iso-level 3 -o "C:\temp\image-file.iso" "C:\files_for_iso"
回答by hmmm
reduce the linux size then you can make an iso. here is the manuel remove code :(run after the chroot) find /etc/usr/share/doc -depth -type f ! -name copyright | xargs rm || true
减小 linux 大小,然后您可以制作一个 iso。这是手动删除代码:(在 chroot 之后运行) find /etc/usr/share/doc -depth -type f !-名称版权| xargs rm || 真的