====== Linux Partition ====== * [[http://gparted.sourceforge.net/|GParted]] 파티션 관리 툴 * [[https://wiki.archlinux.org/index.php/fstab|fstab]] * [[http://ubuntuforums.org/showthread.php?t=1490708|How To Add or Auto Mount Linux Partitions fstab with ownership change]] * [[linux:lvm|LVM]] * [[linux:btrfs|btrfs]] * [[linux:uefi|Linux UEFI]] ===== 파티션 정보 보기 ===== * [[http://www.cyberciti.biz/faq/display-show-linux-partitions/|Show Linux Partitions]] # block device 목록보기 lsblk # /dev/partitions 사용 sudo fdisk -l cat /proc/partitions # 특정 장치 지정 sudo fdisk -l /dev/sda # 모든 블럭 장치의 파티션 목록 보기 - Human Readable 용량으로 보기 sudo parted -l # 파티션 UUID 확인 sudo ls -al /dev/disk/by-uuid # 혹은 sudo blkid * [[https://askubuntu.com/questions/695645/cant-get-my-ntfs-partitions-uuid-in-15-10|mount - Can't get my ntfs partitions UUID in 15.10 - PARTUUID만 있고 UUID가 없을 때]] ===== EFI Partition ===== * 대부분의 경우 EFI 파티션은 FAT32 로 512MB 정도로 설정해야 올바로 작동한다. * [[linux:uefi|Linux UEFI]] ===== ext4 mount ===== * [[https://unix.stackexchange.com/questions/169300/how-should-i-mount-my-ext4-partition-in-fstab|how should I mount my ext4 partition in fstab - Unix & Linux Stack Exchange]] * ''sudo blkid''(일반 권한으로는 모든 디스크 목록이 안나옴) 등으로 UUID 확인 후 ''/etc/fstab'' 설정 UUID= ext4 rw,relatime,discard 0 2 ===== ntfs mount ===== * [[https://wiki.archlinux.org/index.php/NTFS-3G|Arch NTFS-3G]] * [[http://ubuntu.or.kr/wiki/doku.php?id=ntfs_%ED%8C%8C%ED%8B%B0%EC%85%98_%EC%9E%90%EB%8F%99_%EB%A7%88%EC%9A%B4%ED%8A%B8|ntfs_파티션_자동_마운트 [Ubuntu-ko]]] * ''/etc/fstab'' UUID=[파티션ID] /mnt/[경로] ntfs-3g defaults,umask=007,fmask=111,gid=46,uid=1000 0 1 * ''fmask=111''은 NTFS 파티션의 파일들에 대해 실행(execute) Permission을 제거한다. * [[http://askubuntu.com/questions/223016/setting-permission-for-ntfs-partition|Setting permission for NTFS partition]] * umask = user mask (folder and directory!) * dmask = directory only mask * fmask = file only mask * 작성후 sudo mount /mnt/[경로] ===== Windows 8 사용시 NTFS 마운트 실패 ===== * [[http://askubuntu.com/questions/313872/ubuntu-13-04-is-unable-to-mount-a-disk-drive-from-ex-windows-system|partitioning - Ubuntu 13.04 is unable to mount a disk drive from ex-windows system]] * 부팅시 마운트에 실패하고 명령행으로 다시 마운트 시도시 다음과 같은 오류 발생 The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdownWindows fully (no hibernation or fast restarting), or mount the volumeread-only with the 'ro' mount option. * Windows 8로 다시 부팅하여 **제어판 -> 전원관리 -> 시스템 설정 -> 전원 버튼**에서 **빠른 시작**을 끄거나 * 혹은 관리자 권한으로 ''powercfg /h off'' 명령을 실행하고 * 다시 리눅스로 부팅한다. {{:linux:빠른시작.png|}} ===== NTFS 휴지통(trash) 삭제 불가 ===== * 파일을 삭제할 때 휴지통 관련하여 ''Unable to find or create trash directory'' 오류가 발생한다면 해당 파티션에 권한이 없기 때문이다. * ''/etc/fstab'' # 파티션 권한 끝에 uid=1000 추가 /dev/sdc1 /media/Data ntfs-3g defaults,uid=1000,locale=en_US.utf8 0 2 ===== Partition Label ===== * ''fdisk -l''로 각 파티션의 장치(''/dev/sda?'' 같은 값)을 확인한다. * ''e2label 장치경로 레이블'' : ext? 파티션의 레이블 변경. 예) ''e2label /dev/sdb1 DATA'' * ''ntfslabel'' : NTFS 파티션 레이블 변경 * ''mlabel'' : FAT?? 파티션 레이블 변경 ===== Gnome Disk Utility ===== * ''sudo apt-get install gnome-disk-utility'' * 제어판에서 **디스크** 실행 혹은 ''gnome-disks'' * Disk Format 가능 * USB Booting Image 쓰기 가능 ===== KDE Partition 관리자 ===== * https://kde.org/applications/en/system/org.kde.partitionmanager ===== exfat ===== * 4GB 이상을 저장하면서 FAT32 호환을 유지하고, Android 에서 사용 가능하려면 ''exfat''으로 USB를 포맷해야한다. * ''mkfs.exfat'' * ''gnome-disks''에서 사용하려면 아래 패키지 추가 설치 필요 sudo apt-get install exfat-utils exfat-fuse * Android 는 exfat 은 지원하고 ntfs 는 지원하지 않는다. * LG TV는 ntfs 는 지원하고 exfat은 지원하지 않는다. ===== Disk Format ===== * 먼저 포맷할 disk 의 파티션을 확인하고 umount 한 상태에서 * ''mkfs.[파일시스템명] /dev/xxx'' 형식으로 포맷. # 예: /dev/sdb1 이 USB disk일 때 sudo mkfs.vfat /dev/sdb1 ===== disk encryption 디스크 암호화 LUKS ===== * [[https://gist.github.com/luispabon/db2c9e5f6cc73bb37812a19a40e137bc#1-installation-media|Ubuntu + Windows 10 dualboot with LUKS encryption]] * [[https://blog.theodo.com/2022/01/disk-encryption-with-tutorial/|Why You Should Encrypt Your Disk, and How To Do It on Ubuntu with a Dual Boot | Theodo]] * [[https://bruceoutdoors.wordpress.com/2020/04/24/how-to-setup-luks2-encrypted-ubuntu-20-04-with-dual-boot/|How to Setup LUKS2 encrypted Ubuntu 20.04 With Dual Boot | Bruceoutdoors Blog of Blots]] * [[https://www.mikekasberg.com/blog/2020/04/08/dual-boot-ubuntu-and-windows-with-encryption.html|How to Dual-Boot Ubuntu 20.04 and Windows 10 with Encryption · Mike Kasberg]] * [[https://www.youtube.com/watch?v=YU97K8Xavcc|Encrypted dual boot install tutorial - Linux Mint and OEM Windows - YouTube]] * [[https://ubuntu.com/blog/tpm-backed-full-disk-encryption-is-coming-to-ubuntu|TPM-backed Full Disk Encryption is coming to Ubuntu | Ubuntu]] ===== VeraCrypt ===== * https://veracrypt.fr/en/Home.html * [[https://badayak.com/entry/%EC%9A%B0%EB%B6%84%ED%88%AC-%EC%95%94%ED%98%B8%ED%99%94-%EB%94%94%EC%8A%A4%ED%81%AC|우분투 암호화 디스크 만들기 베라크립트 :: 바다야크]] ===== 참조 ===== * [[http://ioriy2k.pe.kr/archives/7062|Ubuntu에서 SSD의 성능과 안정성을 높이는 방법]] * [[http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html|Ivan Kuznetsov › No space left on device – running out of Inodes]] : Disk 용량이 남았는데 no space 관련 오류 발생. inodes 가 너무 많음. * [[https://itsfoss.com/check-mbr-or-gpt/|How to Check if Your System Uses MBR or GPT Partitioning]]