Tag Info

Hot answers tagged

62

Adding up numbers is easy. The problem is, there are many different numbers to add. How much disk space does a file use? The basic idea is that a file containing n bytes uses n bytes of disk space, plus a bit for some control information: the file's metadata (permissions, timestamps, etc.), and a bit of overhead for the information that the system needs to ...


20

That is not a Linux problem, but a BIOS problem, which affects only quite old systems (the first limit was about 504MiB; logical CHS addressing allowed for up to about 8GiB). The BIOS must be capable of using LBA (INT 13h Extensions, defined 1998 with virtually unlimited address space (64 bit)) for Linux to boot from behind 8GiB. There are several versions ...


16

Why don't you just use lsblk? For instance: # lsblk -o name,mountpoint,label,size,uuid NAME MOUNTPOINT LABEL SIZE UUID sda 1.4T ├─sda1 /boot boot 953M f557b9f0-edb5-42bb-94d8-27bc03c3c2c7 ├─sda2 ...


16

That is almost certainly the extended partition that contains your logical ones. You should be able to confirm by running parted -l (or fdisk -l) as root. For example, on my system: $ sudo parted -l Model: ATA ST9500420AS (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type ...


9

You can't convert, but can reformat the partition. Boot into Ubuntu or from a live CD and format the partition from there. Be careful not to format the wrong partition. mkfs.ext3 /dev/hdx1


8

There is a solution using partprobe from parted software. More information here: http://www.gnu.org/software/parted/ After using your fdisk command and having done your modifications, do a partprobe or partprobe /dev/sdx and it should inform the kernel of the change without reboot.


8

Assume partition as just the rooms in the newly constructed house. It just doesn't have any layout or anything till now. All you have done is constructed new rooms in the house. Now, you need to have the rooms designed for specific purposes (for example, the kitchen has to have more storage shelves, the living room has to have more space to accommodate TV ...


7

Partitioners like to align partitions on a mebibyte boundary these days. For MBR partitioning, there are 4 primary partitions, and for the rest you need extended and logical partitions. While the layout of the primary partitions is expressed at the end of the first sector of the disk, for the logical partitions, you've got a linked list of additional ...


7

Unmount the partition: # umount /part Rename the directory after making sure it's not mounted: # mountpoint /part &>/dev/null || mv /part /best_name_ever Edit /etc/fstab to replace /part with /best_name_ever Remount the partition: mount /best_name_ever The # is of course meant to represent your root prompt, not actual input to be typed in. ...


7

That partition is the extended partition that was created which then contains sda4, sda5, and sda6 which are logical partitions. In a MBR formatted HDD you can only have at most 4 physical partitions. So often if you want more you need to create an extended partition to contain any logical partitions. See this ArchLinux Wiki on partitioning for more ...


7

Splitting files in /etc across partitions is a bad idea for this reason. What is happening is that the groupadd utility is creating a temporary file, and then replacing the real /etc/groups file (or rather, what the symlink points to) with the temporary one via a simple rename operation. The catch is that rename() only works on the same filesystem, ...


6

Yes it is. There is no requirement for separate partitions in a Linux install, it's just a very good idea. Having certain partitions separate protects you from losing everything if a single partition fails. It is also good to have your $HOME on a separate partition as that facilitates reinstalling or changing distributions. However, you are free to set up ...


6

Here is the problem in your understanding: My understanding is that the bootloader GRUB2, is mounted to /boot. GRUB is not "mounted" on boot. GRUB is installed to /boot, and is loaded from code in the Master Boot Record. Here is a simplified overview of the modern boot process, assuming a GNU/Linux distribution with an MBR/BIOS (not GPT/UEFI): The ...


6

Separate /boot partition used to be needed (the BIOS in older computers couldn't boot except from the start of the hard drive, and GRUB 1 couldn't boot from some filesystems). Nowadays you don't really need to have a separate /boot partition, except in some specific scenarios (e.g. encrypted root partition). Also, it's used for EFI, as noted in a comment. ...


6

You will first need to reconstruct the partition table the way it was. This will not affect the contents of any partition, just the system's idea of where each partition begins and ends. It sounds like you might have already done this because you seem to have a partition that exists that is "unknown", but exactly the same size as the partition was before. ...


5

You generally don't want to write the filesystem on the entire block device (ie. /dev/sdd), you want to create a partition and then put the filesystem in there (ie. /dev/sdd1). That is also what your mkfs complained about. If you are sure you only want to have one filesystem on this disk at a time, and you don't need a bootloader, you can safely ignore this ...


5

There are a bunch of options mostly named CONFIG_.*_PARTITION, you probably didn't set the one you need. These may only show up if you answer yes to CONFIG_PARTITION_ADVANCED (Advanced partition selection). You're going to want (on a PC) at least: CONFIG_MSDOS_PARTITION=y # traditional MS-DOS partition table CONFIG_EFI_PARTITION=y # EFI GPT ...


5

You use your favorite partition tool (fdisk, cfdisk, parted) in order to change the partition ID. You make the partition a valid LVM partition with pvcreate. You make the new PV available with vgcreate or vgextend. Not complicated at all. The worst case would be that you need partprobe or a reboot for LVM to recognize the new partition but probably LVM ...


5

According to a Lifehacker how-to, it is possible to dual-boot an Intel-based Mac with OSX and GNU-Linux, but you'll need to shrink your HFS partition and create an EXT3/4 partition and a swap partition in that space (instead of installing in/on an HFS partition). The following is verbatim from that How-To: Boot your Mac into OS X. If you're lucky, this ...


5

If you can increase the capacity depends on whether you have LVM installed or not and whether your filesystem supports growing (ext{2,3,4}, btrfs, reiserfs, xfsm, and maybe some others, do) If you do have LVM you can add the new disc add it to the current /home (or if that is not a separate partition /) using vgextend and lvextend. If you don't have LVM, ...


5

Use parted instead, possibly coupled with your filesystem's resizing command. parted is the engine underneath the GParted GUI. You can use it in either interactive command mode or directly from the command line. Before parted 3.0, the following command does what you are probably expecting, having learned about GParted: $ sudo parted /dev/sdb resize 1 1 ...


4

As root: modprobe loop max_part=16 losetup /dev/loop0 file.img vgchange -ay # if using LVM on there mount /dev/the-device /mnt (where the-device is the device (/dev/loop0p2 or /dev/someVG/someLV) with the filesystem that contains your file. Then edit the file, and: umount /mnt vgchange -an someVG # if using LVM there losetup -d /dev/loop0 ...


4

Partition start/alignment Make them start at 1 MiB boundaries, for example using parted and unit mib. That way you won't have an issue with today's 4k sector disks, and not with tomorrow's 8k or 16k disks... and you only waste 1MiB per disk. You can verify the partition alignment of any given disk using parted /dev/disk unit b print free. It ...


4

Given that chunks can be quite big and that the parity information is simple XOR (i.e. does not affect data before or after the piece in question) the assumption that only complete chunks can be written does not make sense to me. Chunks are the unit in which data is spread over the volumes. One chunk of continuous data is written to a certain volume, the ...


4

They way I would go about this is to partition the SSD as you want it (/, /boot, /home, etc) and since you're moving everything to a new SSD you don't need to worry about shrinking partitions or anything complicated like that. You basically just need to copy everything to the SSD, repartition the HDD and edit your mount points on disk and in your fstab. ...


4

Moving pacman is not the right approach. You do, however, have a couple of options. All of them assume that you already have a full and tested backup of your data. First, make sure that you have cleared all available space in pacman's cache with pacman -Sc: pass the second c for everything. There is a pacman tool for more fine-grained control fo this, see ...


4

Warning: with dd you can destroy data very easily, make sure you have backups and are familiar with dd before using it dd starts copying from the first byte of the disk you specify, including the master boot record, mbr. For example http://www.cyberciti.biz/faq/howto-copy-mbr/ dd if=/dev/sda of=/tmp/mbr.bak bs=512 count=1 This will copy the first 512 ...


4

The partitioning of your system strictly depends on its purpose. I would partition even a small home server not in the same way as a desktop system as they not only differ in the purpose but also in the installed software. To me it seems the 15-25 GB proposal only applies to general Linux systems designed for daily use. For a desktop/laptop 25 GB ought to ...


4

No! /dev/sda contains: a small /dev/sda1 which is needed to boot. a extended partition /dev/sda2 The extended partition contains a logical partition /dev/sda5. The logical partition contains a LVM setup, broken down into to two logical volumes: /dev/mapper/server--vg-swap_1 which is your swap space /dev/mapper/server--vg-root which is your root (/) ...


4

You may want to try booting into a recovery disk. System Rescue CD MAY be able to recover the data. It is better to do this from a live disk because then you are less likely to overwrite the information that is there. When you delete a file it is not wiped, but instead the computer sees it as space that it can write over. As long as it has not been ...



Only top voted, non community-wiki answers of a minimum length are eligible