Tag Info

Hot answers tagged

65

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 ...


31

This is a limitation imposed by having a very old BIOS and bootloader rather than Linux itself. The BIOS would only be able to access the first 1024 cylinders of the disk (see here for more information on what cylinders/heads/sectors are). This limitation would extend to bootloaders which, due to their simple nature, would not have their own disk drivers and ...


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 ...


19

Another reason beside the mentioned BIOS problem is that a separate /boot partition allows the use of a file system for the / volume which the boot loader does not understand (without being limited to block list loading like with lilo).


17

The history /boot contains files that aren't used by the operating system, but by its bootloader. You'll find both files of the bootloader itself (like /boot/grub/* for Grub) and the Linux kernel (/boot/vmlinuz*) and often an associated initrd or initramfs. On a PC with legacy BIOS (as opposed to the newer UEFI found on most recent computers), the software ...


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 ...


13

BOOTING IS HARD Booting... well... it really is the hardest part. Every time a computer boots it basically meets itself anew. It acquaints itself with its various parts, and for each one it meets it gains capability. But it has to pull itself up by its own bootstraps, so to speak, from square one every time. The trick is - when designing a boot process - ...


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

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, ...


7

That there is a /boot directory is historically determined and from there "fixed" in the Filesystem Hierarchy Standard. Having such a standard allows programs (and sysadmins) to expect certain files at certain locations. In this case the files associated with the boot process. Having a /boot partition at the beginning of a disc made sense for older BIOS'es ...


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

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 ...


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 ...


5

From the Wikipedia entry: [The] maximum disk size supported on disks using 512-byte sectors (whether real or emulated) by the MBR partitioning scheme (without using non-standard methods) is limited to 2 TB. 2TB = 2*1024*1024*1024*1024 = 2^41 = 2^32 * 2^9, and 2^9 is 512.


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

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

It should be mkfs.vfat -I /dev/sdb. sdb1 indicates you probably have more than one partition, and you're just formatting the first one, which happens to be 64MiB.


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 (/) ...



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