Tag Info

New answers tagged

0

You can use Kickstart. An excerpt from https://gist.github.com/ludo/3652811 example: bootloader --location=mbr zerombr yes clearpart --all --initlabel part /boot --fstype=ext2 --size=64 part swap --size=1024 part / --fstype=ext4 --size=1 --grow


3

Depends on what you're after. If you want to check which of the partitions in /dev/sd* has a default mountpoint and what that mountpoint is, you could do for part in /dev/sd*; do grep -w "$part" /etc/fstab | awk '{print $1,$2}; done However, on most modern systems, partitions are mounted by UUID and not dev name, so a better approach1 would be: for uuid ...


6

Another approach is with findmnt: findmnt /dev/sda4 ...to get mountpoint from dev. Or vice-versa: findmnt /home


3

You're actually asking two questions. The easiest thing to do if you want to know where your home is: cd df -h . Or df -h $HOME Where is /tmp mounted? df -h /tmp ...etc. If you want to know what is mounted on a certain device, mount | grep ^/dev/sda1 (for example). Or mount | grep ^/dev/sd to see all the sd's.


6

You can use: mount for a list of all mounted filesystems and mount options for each of them; lsblk for a tree of block devices, size and mount point (if mounted); df for a list of mounted block devices, size, used space, available space and mount point.


2

You can use mount command. It also shows options with which the mounting is done.


2

You're looking for the df command.


2

I'm a fan of LVM but I don't think it is required in this case - if all you want to do is to expand your sda1 filesystem to use the rest of the space on this drive. Assuming you don't at the moment have any data on your sda3, a better strategy is: with fdisk it is hard to work out the actual sizes of the partitions, use swapon -s to show the size of your ...


1

First, you can't extend /dev/sda1 to include /dev/sda3 as their space allocations are NOT contiguous. You'd have to dump everything, re-layout the partitioning, and restore. Second, /dev/sda1 does not to appear to be an LVM partition. Even if you wanted to add the apparently unclaimed physical volume created in /dev/sda3, this would not be possible. ...


1

The apparent answer is to run these two commands lvcreate --name opt --size 23Gi group mkfs -t ext4 -L opt /dev/group/opt However, via the comments thread it became apparent that lvcreate threw an error message, /dev/group/opt: not found: device not cleared Aborting: Failed to wipe start of new LV A search on Google finds that this is a known error, ...


1

In theory, in your C program, you should add a line like this: int res = system("/bin/parted <options>"); The C program must be executed with root privileges (or run through sudo). The res variable contains the result of the command (see man system for details). As an alternative, use a command of the exec family (see man exec for details). For ...


1

Look at Moving /etc to separate partition for reasons it's difficult (if not impossible) to use separate partitions for /etc or subdirectories thereof. You might find etckeeper useful for your use-case; it allows keeping /etc in a version-control system such as git, which means you can then easily maintain a copy somewhere else with all the history. If ...


0

I believe your system is using LVM. And it seems GParted is not able to expand the logical volume. But you can do it manually. Just boot your system as normal, then from a terminal window do: sudo lvextend -L+20G -r /dev/mapper/centos-root # resize the LV and the underlying fs (If you are running as root in the terminal then you don't need sudo.) This ...


0

the partiton types are set using fdisk or equivalent, I don't know of an automated way to copy them. so you will have to set the type when you create the partition. or update the type manually after the creation.


0

dd is your friend. Example syntax: dd if=/dev/sda1 of=/dev/sdb1 bs=1M Alternatively you can dd the partition to a file and the dd the file to your target disk at a different offset. For more information, type man dd in a console to find out the various uses and options. Edit, modified example to show how to copy a partition.


2

If resizepart does not work, you might have to resort to rm and mkpart to achieve the same thing. Of course, this would require you to parse the partition table first in order to determine partition type and start offset. Unless you already know the necessary values. After all you had to get the 166016512B from somewhere too. parted has the --machine ...


0

If you want to automate with parted using just command-line arguments, run it -s. From man parted: -s, --script never prompts for user intervention


0

This data is not your SD card memory, but is sent by your SD card controller (ASMI). This page describes the problem as it happened to me: http://www.idioten-notschlachten.de/blog/2011/11/13/kennen-sie-asmi/


1

Apart from Dylan suggestions to start over, another, non-intrusive option is to move some material from the root partition to the partition for the home directories. You should only do that for non-boot-critical material, but there is a lot of that in / outside of /home. My first Unix even had separate partitions for /usr and /var. You can copy e.g. ...


0

I am trying to mount a partition on a GPT disk, mount /dev/vda2 /mnt/server_disk give me an errors: mount unknown filesystem type 'lvm2_member' where /dev/vda0 have GPT partition table. For mount I found solution here http://pissedoffadmins.com/os/mount-unknown-filesystem-type-lvm2_member.html


2

Current util-linux versions of fdisk support GPT, the one I'm looking at here is fdisk from util-linux 2.24.2 (reported via fdisk -v). Run fdisk /dev/whatever. Have a look at the options with m. Note these change depending on the state of the partition table. First check what state the disk is currently in with p. Note the Disklabel type; if it is gpt ...


3

The dirty bit is set and cleared in the kernel, when mounting and unmounting a device; see http://lxr.free-electrons.com/source/fs/fat/inode.c?v=3.19#L578 for the implementation. There's no way currently to access this function outside the kernel, except by mounting and unmounting... To set it yourself, you'd need to tweak the device directly; the state ...


1

Have you formatted the swap partition? Once you part your disk and reserve a partition for swap you have to: sudo mkswap /dev/sdb5 after that your swap's UUID should be displayed when entering blkid command.


0

I've mentioned the Solution here on Unix Stackexchange. Either try the grub-mkconfig method by booting into Linux through Super Grub 2 Disk that I also mentioned, OR, directly recover Windows Loader and recover Linux later when you need it. It's all mentioned in the Link.


0

Grub2 has two parts -- one in the MBR and the other one on a regular partition. The rescue prompt means grub has failed to load its second part. To fix that, you need to reinstall grub from a real system. Either you can boot from live CD/USB (easy), or you can redirect the rescue terminal to load the other parts, if you know where from (not so easy). Check ...


0

I feel this question should have a working example so this is how I used ddrescue 0) Installed an identical size (and brand) replacement drive under warranty and moved the old drive to a second slot 1) I used an ubuntu boot cd I tried the simple option but it immediately produced a lot of errors and hung dd if=/dev/sdb of=/dev/sda bs=512 ...


0

use liveCD, find partition where ubuntu is installed (use Gparted -similar partitioning program. mount the partition (Ext4-usually): "sudo mount /dev/sda1 /mnt" (where partition name is sda1 else sdb1, sda2 etc...). Now bind "sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc ...


0

I found a solution: A program called kpartx, which is a userspace program that uses devmapper to create partitions from loopback devices, which works great: $ loop_device=`losetup --show -f /dev/sdg` $ kpartx -a $loop_device $ ls /dev/mapper total 0 crw------- 1 root root 10, 236 Mar 2 17:59 control brw-rw---- 1 root disk 252, 0 Mar 2 18:30 loop0p1 ...


0

Disk is part of active ZFS pool? In this case - detach disk from pool or destroy pool first, then create gpt table..



Top 50 recent answers are included