- Команда dd. Создать образ из файлов папки?
- How To Create ISO Files In Linux
- Via Archive Manager
- Via Command Line
- Conclusion
- How to Create an ISO File in Ubuntu 18.04 LTS
- Using Mkisofs utility
- Using dd command in Terminal to build an ISO file
- Using Brasero utility to make an ISO file
- Karim Buzdar
- Как создать ISO файл в Linux
- Как создать ISO-файл из файлов на ПК
- Как создать ISO-файл из компакт-диска
- Советы
- Linux creating CD-ROM ISO images from a CD, DVD, Blu-ray
- How do I use dd command on Linux to create an ISO image?
Команда dd. Создать образ из файлов папки?
в папке /var/cache/pacman/pkg много файлов. их нужно записать в iso образ.
Даю команду: dd if=/var/cache/pacman/pkg of=obraz.iso
И ничего не срабатывает. Пишет 0 файлов найдено и т.д.
dd работает только с отдельными файлами. а ты ему каталог отдаешь.
и еще, dd — это не команда для создания iso образов — это команда для побитового копирования. и то что ней клепают исо-шки, так это только потому что всякие /dev/sdc суть файлы, репрезентирующие блочные устройства.
почитай какую нить книгу про линукс — избавишься от таких ошибок
в папке /var/cache/pacman/pkg много файлов. их нужно записать в iso образ.
Даю команду: dd if=/var/cache/pacman/pkg of=obraz.iso
И ничего не срабатывает. Пишет 0 файлов найдено и т.д.
Жесть =). Команда dd просто читает данные из _одного_ файла и записывает в другой. Про директории и формат ISO она вообще ничего не знает. С помощью dd образ в формате ISO можно снять только с диска (/dev/cdrom), т.к. на диске и так всё уже в формате ISO.
Чтобы создать образ с нуля — воспользуйся mkisofs:
mkisofs это ущербная утилита. У CD дисков есть ограничение на глубину папок, имена файлов, папок. Можно потерять некоторые файлы.
в таком случае, можно создать образ раздела в файле.
dd if=/dev/zero of=image_file.img bs=1M count=1024 //получаем образ на 1 гиг
mkfs.ext4 image_file.img
потом файл монтируется в каталог и в него копируются нужные файлы.
Если нет желания пользоваться mkisofs (кстати, mironov_ivan , посоветовал неправильный ключ: -J не нужен, нужен -R, ибо joilet-расширение для мастдая) можно так:
1. Создаем командой dd файл с размером, равным размеру данных, влезающих на dvd:
2. Создаем на нем ext2:
3. В fstab прописываем:
3. Монтируем образ и записываем в него свои данные, как только место на образе кончится, отмонтируем и записываем на болванку:
4. Монтируем образ и удаляем содержимое для подготовки к записи следующей порции файлов.
Работает на ура. Из плюсов такого способа: можно постепенно подкидывать файлы на образ и записывать, когда он полностью забьется; 99% гарантии, что в мастдае такой диск никто не откроет. Ну, а если перед записью выставить права 0 на корень образа, то его можно будет прочитать только скопировав на диск, смонтировав и изменив права — т.е. так ваши данные будут в довольно надежной сохранности. При желании можно еще и зашифровать ФС на образе.
Источник
How To Create ISO Files In Linux
You probably know that an ISO file can be burned onto a CD/DVD or USB drive, but did you know that you can easily back up or archive your files and folders into an ISO file as well? With this ISO file you can then burn it onto a CD/DVD as a backup or simply mount it like an external drive and access the files from within.
If you want to back up the content of a disc or if you have a bunch of files and folders that you want to back up and archive, here is how you can create ISO files in Linux.
Via Archive Manager
If you are using Ubuntu (or Gnome desktop), the Archive Manager application (file-roller) allows you to easily create an ISO file.
1. Open the file manager. Select the files and folders that you want to back up. Right-click on them and select “Compress.”
2. Select “.iso” option, and click “Create.” This will compress all the selected files and folders into an ISO file.
Via Command Line
dd is a useful command that you can use to create ISO file. All you need to do is specify the source and destination, and it will do the necessary work of creating an ISO file.
The basic usage is as follow:
For example, if your CD-ROM drive is mounted at “/dev/hdc,” and you want to back up the content of your disc to a “my-cd-backup.iso” file, you can use the following command:
The “source” doesn’t have to be a CD-ROM drive. It can be a hard drive partition, an external drive or a file path, though it won’t work on a folder.
Note: there is much more to dd than described above, but we won’t go into the details here.
Alternatively, you can also use the mkisofs command to create an ISO file. The advantage of mkisofs is that it gives you more options to customize how you want the ISO file to be created.
The basic usage is as follow:
For example, use the following command to backup your Home folder:
You can tell mkisofs to enable Rockridge extension by setting the -R option.
The Joliet extension is enabled by the -J flag.
You can also set a volume name (-V option) for the ISO file. (If you burn your ISO file to a CD, the volume name will be used as the CD’s name.)
You can also exclude certain files to add to the ISO file with the “-m” option. It supports wildcard (*), so you can use it for something like the following
to exclude all hidden files (filename with a “.” in front) from adding to the ISO file.
Check out all the options of mkisofs with the following command:
Conclusion
While it may not be the best backup option, an ISO file can be rather useful in some instances. With the above instructions, you can now create ISO files with ease.
Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.
Источник
How to Create an ISO File in Ubuntu 18.04 LTS
Most operating system and programs especially large one comes in an ISO format containing all required installation files. An ISO file or an ISO image is a perfect representation of all file and folders contained in a CD /DVD. Alternatively, you can say that it is a package all installation files and folder in one single file in an ISO format.
You can easily back up or archive the files and folders into an ISO file. You can make that ISO file to act it as an external drive, make bootable USBs or CD/DVD to later use for installation, save as a backup or distributing it over to someone.
With ISO files, you can:
- Create an installation disc by Burning to USB or CD/DVD.
- Mount as a virtual drive.
- Use for installation of OS or software programs.
In this article, I will describe some ways to create an ISO file in Ubuntu 18.04 LTS.
Using Mkisofs utility
Under Linux, you can create an ISO image from a folder using a command line argument with the Mkisofs utility. You can use Mkisofs to automatically backup the data with the option to exclude some individual files if necessary. It supports wildcards as well.
The basic syntax of the command is:
$ mkisofs -o [filename.iso] [ directory_path]
-o defines the file name of the ISO you want to create followed by the directory you want to backup or store an ISO file.
For instance, I want to create an ISO file from the directory /home/tin/Documents/backup and save it as backup.iso file:
It will create the backup.iso file and save it in the current directory.
Using dd command in Terminal to build an ISO file
Basically using dd command, we can create copies of data whether they are file or folders, partitions, or CD/DVDs. We can also make use of dd command to create ISO files.
The basic syntax of dd command is: Advertisement
$ dd if=[source] of=[target.iso]
If= Tells command from where to input the source data.
Of= Tells command where to define the output.
For instance, I will type the following command to copy and save the contents of the drive as an ISO file named diskimage.iso:
The ISO image named diskimage.iso will be created in the current directory.
Using Brasero utility to make an ISO file
You can use Linux disk burning utility Brasero to create an ISO file. Older versions of Ubuntu include built-in Brasero utility. However, in 16.04 and the newer version, you have to manually install this utility.
To install Brasero, press Ctrl+Alt+T to launch Terminal.
Enter the following command in Terminal:
Once you have done with the installation, open the application.
To open the Brasero application, Press windows key or click on dash icon in the bottom left corner of the desktop to open Dash menu.
Then search for Brasero application by typing its name in the search bar. When the application appears, click on it to open it.
In the Brasero application window, click on the Data project option.
Then click on the + icon to start adding files to the new project.
From the window that appears, select the individual files or directories then click on Add.
You will notice that files are added in the application. Click on Burn.
Choose the location to save the ISO file. Specify the name for the ISO file with .iso extension and click on Create Image.
Once finished, you will be notified that the image has been successfully created.
Hence all above were the different ways using which you can create ISO files. Once you have ISO file, you can save it as a backup, use it as virtual CD/DVD, burn it on USB or CD/DVD and share it with someone.
Karim Buzdar
About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn
Источник
Как создать ISO файл в Linux
Сегодня в статье поговорим о том, как создать iso файл в linux. Рассмотрим несколько примеров по формированию образов iso с CD-диcка, с USB флеш диска, и из файлов и директорий расположенных на вашем ПК.
iso файл – это своего рода архив, который целиком сохраняет структуру файловой системы носителя, указанного при его копировании/создании.
Как создать ISO-файл из файлов на ПК
Скопируйте нужные файлы, из которых будет создан ISO-файл, в какой-нибудь каталог .
Откройте терминал. В Desktop Ubuntu/Debian нажмите ctrl+shift+T
Введите следующую команду, которая создаст из файлов ISO-образ.
- iso-directory — название директории, в которой хранятся файлы, на основе которых будет создан ISO-файл.
- my_files.iso — название вашего будущего ISO-файла
Имена файлов и директорий чувствительны к регистру, поэтому не забудьте про прописные буквы (если они есть).
Как создать ISO-файл из компакт-диска
Вставьте компакт-диск, который нужно скопировать на компьютер. Имейте в виду, что нельзя создать ISO-файл из компакт-диска с защитой от копирования (например, из аудио-компакт-диска или DVD-диска с фильмами).
Для создания iso-образа воспользуемся командой dd. Создание ISO образов, это лишь малая часть возможностей этой утилиты. Итак, чтобы создать ISO образ диска в Linux выполните команду:
- /dev/cdrom — стандартный путь в Linux к компакт-диску. Если у вас путь отличается, то вводим свой.
- my_cd.iso – имя будущего ISO-файла.
Если на компьютере есть несколько оптических приводов, они будут помечены цифрами, например, первый привод будет называться «cd0», второй – «cd1» и так далее.
Возможно, система предложит вам ввести пароль, перед тем как создать ISO-файл. В этом случае введите пароль и нажмите ↵ Enter .
Советы
- В большинстве дистрибутивов Linux есть файловый менеджер, с помощью которого можно создать ISO-файл, используя контекстное меню (открывается щелчком правой кнопки мыши).
- Для того чтобы примонтировать созданный Вами ISO образ, достаточно использовать команду:
- /home/username/my_cd.iso — путь до iso-файла.
- /mnt/myiso — путь куда монтируем наш iso-образ.
Если есть вопросы, то пишем в комментариях.
Также можете вступить в Телеграм канал, ВК или подписаться на Twitter. Ссылки в шапки страницы.
Заранее всем спасибо.
Источник
Linux creating CD-ROM ISO images from a CD, DVD, Blu-ray
dd is a perfect tool for copy a file, converting and formatting according to the operands. dd command works on Linux and a Unix-like system whose primary job is to convert and copy files. It can create exact CD-ROM ISO image or create a new CD/DVD iso image. This is useful for making a backup, as well as for hard drive installations, require a working the use of ISO images.
How do I use dd command on Linux to create an ISO image?
Put CD or DVD into CDROM/DVDROM drive.
Do not mount CD/DVD. Verify if the cd is mounted or not with the mount command:
$ mount
If CD/DVD was mounted automatically unmount it with the help of umount command:
$ sudo umount /dev/cdrom
OR
$ sudo umount /mnt/cdrom/
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Warning: Reading and writing partitions or data from it has the VERY REAL potential to cause DATA LOSS. Use common sense. BACKUP ANYTHING YOU DO NOT WANT TO LOSE! Wrong command line option can result in DATA LOSS.
Create CD-ROM/DVD ISO image with dd command:
$ sudo dd if=/dev/cdrom of=/tmp/cdimg1.iso
Where,
Источник