티스토리 뷰

윈도우와 달리 리눅스 환경에서는 CD와 USB가 자동으로 연결되었다고 사용자에게 알려주지 않는다. 사용자는 MOUNT 가 되어있는지 확인하고, MOUNT하거나 UMOUNT하는 기본적인 명령어를 알고 있어야 한다. CD/DVD는 /media 디렉토리가 된다. CD/DVD는 /dev/sro, /dev/cdrom 이나 /dev/dvd 파일이름이고. USB는 /dev/sdb1 이 되겠다.

 

Unlike Windows operating system, Linux never informs users when new stroage devices, such as CD/DVD or USB connect to server. Thus, users should know how to see if there is any new mounted devices on server and also how to use mount & umount command. CD/DVD and usb are belong to /media directory. CD/DVD file's names are /dev/sr0, /dev/cdrom or /dev/dvd. USB file name is /dev/sdb1.

 

 

1. 마운트 정보 확인 Check if any mounted devices

 

~]# mount

 

 

보는것과 같이 /dev/sr0이라는 물리적인 CD/DVD가 /media/cdrom_iso9660 디렉토리에 연결(마운트) 되었다는 소리다.

As you can see above, CD/DVD physical devices, called /dev/sro0 is connected to directory of /media/cdrom_iso9660, which means it is mounted.

 

2. 마운트 해제 Unmount

 

~]# umount /dev/cdrom

or ~]# umount /dev/sr0

 

 

We can't see any cdrom /dev/sr0 and /media/ directory.

 

 

3. 마운트 mount

 

일단 /media 디렉토리이긴 한데 그 안에 마운트될 디렉토리할 곳을 만들어줘야한다. /media/cdrom으로 하겠다.

We know cdrom will be in /media direcory anyway, but we have to create one more directory where will be mounted. I would name it as /media/cdrom

 

~]# mkdir /media/cdrom

~]# mount /dev/sr0 /media/cdrom

 

 

4. iso 파일 생성

 

그림은 이렇다. iso 파일을 생성하는 명령어(패키지)가 리눅스에 있는지 확인하고, 없으면 yum install 명령어로 패키지 설치하면된다. 그리고 명령어(패키지)를 이용해서 /boot 디렉토리의 모든파일을 iso로 만든다. 이것을 마운트할 디렉토리를 /media에 만든후 마운트 시키면 된다.

 

Overall plan will be like this...check if command(package) that create iso file exist on linux. If not, use 'yum install' command to install 'iso create' package on you linux. Then, use this package to make all files of /boot directory into iso file. At last, we have to make new directory in /media to mount on.

 

~]# rpm -qa genisoimage

 

=> ~]# rpm -qa 패키지이름Package name

해당 패키지가 설치되어있는지 확인해주는것.

Check if package has installed already.

 

~]# rpm -qa genisoimage  => iso 파일 생성 패키지 | package to make iso

~]# rpm -qa cdrecord => cd 굽기 | burn into cd

~]# rpm -qa dev+rm-tools => dvd 굽기 | burn into dvd

 

 

 

 

~]# yum -y install genisoimage

 

=>~]# yum -y install 패키지이름Package name

패키지가 설치가 안되어있으면 'yum -y install' 명령어 이용해서 설치

if package is not installed, use 'yum' command to install genisoimage package.

 

 

~]# genisoimage -r -j -o test1.iso /boot

 

=>~]# genisoimage -r -j -o 생성될ISO파일명ISOFileNametobeCreated 포함될디렉토리또는파일FileorDirectorytobeIncluded

 

/boot 디렉토리의 파일을 포함시켜 iso파일로 test1.iso라는 파일명으로 만들겠다.

Meaning create test1.iso file by include the files of /boot directory.

 

 

 

 

~]#mkdir /media/iso

make new directory to be mounted in /media directory

~]#mount -o  loop  test1.iso  /media/iso

mount 'test1.iso' onto directory we have just created, 'media/iso'

 

 

~]#ls -l  /media/iso

~]#ls -l  /boot 

check if it works out well by comparing between /boot files and /media/iso files.

 

 

 

 

 

 

 

 

 

 

 

 

   

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함