Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
5846 views
How to convert grub config to use kernel device names instead of UUID
I've got a bunch of identical systems on which I want to clone the same openSUSE 12.3 installation. I've set up clonezilla on PXE server. After appling the disk-image of on another machine, it fails to boot. This is because all the partitions are referred to be their UUIDs instead of the kernel-assi...
I've got a bunch of identical systems on which I want to clone the same openSUSE 12.3 installation. I've set up clonezilla on PXE server. After appling the disk-image of on another machine, it fails to boot. This is because all the partitions are referred to be their UUIDs instead of the kernel-assigned name (sda1, sda2, etc). How do I configure grub to be using the kernel names instead of the UUID so that the image can be truly ported to the other systems? I have tried setting GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub and then run grub2-mkconfig -o /boot/grub2/grub.cfg. I have also changed the entry in /etc/fstab. After these changes, the system still boots fine on the source machine, but doesn't boot on all the others. Grub loads, but only shows the word "GRUB" and thats all. Nothing else happens. My current grub.cfg is the following: # # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi set default="${saved_entry}" if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 5613d48c-eedb-4389-91bc-e49de73a1cc4 else search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4 fi font="/usr/share/grub2/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_output gfxterm insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 5613d48c-eedb-4389-91bc-e49de73a1cc4 else search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4 fi insmod gfxmenu loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2 insmod png set theme=($root)/boot/grub2/themes/openSUSE/theme.txt export theme if [ x${boot_once} = xtrue ]; then set timeout=0 elif sleep --interruptible 0 ; then set timeout=5 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'openSUSE 12.3' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5613d48c-eedb-4389-91bc-e49de73a1cc4' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 5613d48c-eedb-4389-91bc-e49de73a1cc4 else search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4 fi echo 'Loading Linux 3.7.10-1.4-default ...' linux /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5 splash=silent acpi=on barrier=off reboot=pci init=linuxrc splash=silent quiet showopts echo 'Loading initial ramdisk ...' initrd /boot/initrd-3.7.10-1.4-default } submenu 'Advanced options for openSUSE 12.3' $menuentry_id_option 'gnulinux-advanced-5613d48c-eedb-4389-91bc-e49de73a1cc4' { menuentry 'openSUSE 12.3, with Linux 3.7.10-1.4-default' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.4-default-advanced-5613d48c-eedb-4389-91bc-e49de73a1cc4' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 5613d48c-eedb-4389-91bc-e49de73a1cc4 else search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4 fi echo 'Loading Linux 3.7.10-1.4-default ...' linux /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5 splash=silent acpi=on barrier=off reboot=pci init=linuxrc splash=silent quiet showopts echo 'Loading initial ramdisk ...' initrd /boot/initrd-3.7.10-1.4-default } menuentry 'openSUSE 12.3, with Linux 3.7.10-1.4-default (recovery mode)' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.4-default-recovery-5613d48c-eedb-4389-91bc-e49de73a1cc4' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 5613d48c-eedb-4389-91bc-e49de73a1cc4 else search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4 fi echo 'Loading Linux 3.7.10-1.4-default ...' linux /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe echo 'Loading initial ramdisk ...' initrd /boot/initrd-3.7.10-1.4-default } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/20_ppc_terminfo ### ### END /etc/grub.d/20_ppc_terminfo ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-52EA4C7AEA4C5C7B' { insmod part_msdos insmod ntfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 52EA4C7AEA4C5C7B else search --no-floppy --fs-uuid --set=root 52EA4C7AEA4C5C7B fi chainloader +1 } ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### ### BEGIN /etc/grub.d/90_persistent ### ### END /etc/grub.d/90_persistent ###
d_inevitable (271 rep)
May 13, 2013, 05:58 AM • Last activity: Jun 10, 2025, 03:02 PM
1 votes
1 answers
4815 views
How to mount a ZFS pool in FreeBSD for cloning
I am in the process of trying to clone a FreeBSD installation onto a new hard drive and need to mount it and then find the mount points in order to proceed with the cloning process. The internal drive that I want to clone to currently has a Windows 10 install and a not very optimised FreeBSD install...
I am in the process of trying to clone a FreeBSD installation onto a new hard drive and need to mount it and then find the mount points in order to proceed with the cloning process. The internal drive that I want to clone to currently has a Windows 10 install and a not very optimised FreeBSD install that I want to clone over. I am happy to use the current UFS partition scheme for the FreeBSD. I will boot from a live FreeBSD USB stick in order to run the appropriate commands. The problem that I am having is that the disk I want to clone from is partitioned using ZFS and I can't get my head round how to mount it and then how to find the mount points. The disk is connected to my computer using a USB-SATA adapter.
Simon Baldwin (567 rep)
May 5, 2022, 11:01 AM • Last activity: Apr 28, 2025, 08:22 PM
1 votes
2 answers
5020 views
How to clone / move entire Fedora installation onto larger disk with minimal changes to the system?
## Scenario I have an SSD in my computer (250GiB), with both `/boot` and `/`/`/home` partitions on it. I'd like to move that into a new M.2 NVME drive which is much larger (1TiB). The distro I'm using is Fedora 37. my `/etc/fstab` looks like this: ``` # # /etc/fstab # Created by anaconda on Tue Jun...
## Scenario I have an SSD in my computer (250GiB), with both /boot and ///home partitions on it. I'd like to move that into a new M.2 NVME drive which is much larger (1TiB). The distro I'm using is Fedora 37. my /etc/fstab looks like this:
#
# /etc/fstab
# Created by anaconda on Tue Jun 28 05:26:41 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 /                       btrfs   subvol=root,compress=zstd:1 0 0
UUID=a14f6d42-3a64-4f96-856c-51e0f4344481 /boot                   ext4    defaults        1 2
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 /home                   btrfs   subvol=home,compress=zstd:1 0 0
lsblk looks like this:
NAME   KNAME PATH       TYPE MODEL                     STATE   RO RM HOTPLUG FSTYPE FSVER LABEL                 PTTYPE PARTTYPE PARTTYPENAME PARTLABEL PARTFLAGS   SIZE FSSIZE FSAVAIL
sda    sda   /dev/sda   disk Samsung SSD 850 EVO 250GB running  0  0       0                                    dos                                              232.9G        
├─sda1 sda1  /dev/sda1  part                                    0  0       0 ext4   1.0                         dos    0x83     Linux                  0x80          1G 973.4M  608.1M
└─sda2 sda2  /dev/sda2  part                                    0  0       0 btrfs        fedora_localhost-live dos    0x83     Linux                            231.9G 231.9G  108.3G
zram0  zram0 /dev/zram0 disk                                    0  0       0                                                                                       7.5G
**Note:** both / and /home/ are subvolumes of the same partition! They're not on individual partitions as such. ## Problem How would I go about doing this, with minimal interruption to my work time? I thought I'd boot up a live distro with gparted and then move partitions over, but since there are UUIDs scattered all over my current setup, I think I might run into problems, also I'm not sure this is the preferred method. As a *bonus*, I suppose, I'd like a swap partition on my hard drive, that is larger than my current amount of RAM (8GB). Currently, I only use ZRAM, but I'd like to have a swap partition that is larger (perhaps twice in size) than my current amount of RAM, so that I can safely put my computer into hibernation. Also, more swap would be quite good for my VMs, and I'm struggling running more than around two VMs, currently. This is roughly how I think I should go about this: 1. I thought I'd clone the current layout onto my 1TB drive, however I'm not sure which tool to use would be best, leaving a large chunk of the drive empty. 2. I'd then create a swap partition towards the end of the un-allocated space. 3. And then enlarge my /dev/sda2 partition, so that I can use the entirety of my drive, etc. Please advise the order of procedure (step 0 would be to create a backup, obviously), as well as the tools I should perhaps try out, etc.
polemon (11921 rep)
Feb 6, 2023, 03:46 PM • Last activity: Apr 28, 2025, 12:03 PM
2 votes
1 answers
216 views
Can you swap a Linux Mint installation from a laptop to Raspberry Pi 5?
I am new to using Linux after deciding to go all in and wipe my laptop drive and clean install Linux Mint on my old laptop which is not supported by Windows 11. The laptop has now given up the ghost, and I am starting to prefer Linux Mint to Microsoft Windows. So, I decided to go for a Raspberry Pi...
I am new to using Linux after deciding to go all in and wipe my laptop drive and clean install Linux Mint on my old laptop which is not supported by Windows 11. The laptop has now given up the ghost, and I am starting to prefer Linux Mint to Microsoft Windows. So, I decided to go for a Raspberry Pi 5 with 8GB RAM and an NVMe hat. I am under the impression that I don't need to install from scratch like I would need to with Microsoft Windows. So, can I just connect the laptop SATA drive to a USB connector via an adapter and use that to boot into my old Linux Mint setup, or will I need to clone the SATA drive contents to an SD card or NVMe drive?
Chris Rogers (123 rep)
Apr 3, 2025, 11:28 AM • Last activity: Apr 3, 2025, 11:43 AM
6 votes
3 answers
1413 views
Changing HFSPlus UUID from PartedMagic
I needed to make a clone of my hard drive recently (bad blocks FTW). I was using Clonezilla at the time. However, Clonezilla refused to copy the HFS+ partition, so I did it manually. The problem is that the UUIDs are out of sync. What is the command to set a specific UUID for HFS+?
I needed to make a clone of my hard drive recently (bad blocks FTW). I was using Clonezilla at the time. However, Clonezilla refused to copy the HFS+ partition, so I did it manually. The problem is that the UUIDs are out of sync. What is the command to set a specific UUID for HFS+?
Kaz Wolfe (495 rep)
Sep 7, 2014, 05:45 AM • Last activity: Mar 16, 2025, 06:40 AM
3 votes
1 answers
4327 views
How do I clone a single drive onto a new RAID 1 array?
I'm maintaining a DELL Precision T7600, which lost a hard-drive. Just the `/home` directory was on it and has been recovered. I've been tasked with making a RAID 1 of the OS drive so that our downtime is minimized. I read about hard-drive cloning on the Arch-Linux wiki, and am currently following th...
I'm maintaining a DELL Precision T7600, which lost a hard-drive. Just the /home directory was on it and has been recovered. I've been tasked with making a RAID 1 of the OS drive so that our downtime is minimized. I read about hard-drive cloning on the Arch-Linux wiki, and am currently following these two guides , leaning on the first for the grub2 configuration, but I could not wrap my head around it. Perhaps it is a simple dd if=/dev/sdc of=/dev/md126 command. Is dding to an array from a device file possible or recommended? * I tried dding to the /dev/md0 device, but it was a bit smaller than the original, so I got an error from dd about not being able to copy to /dev/md0. I tried to boot off of this array, but ran into error: file '/grub/i386-pc/normal.mod' not found. and was put into a grub rescue>, which I don't know what to do with. So I tried to mount the array in order to do a grub-install on it, but mount told me: unknown filesystem type 'linux_raid_member' * I ran this command to clone my OS drive to the two blank drives:
-sh
    sudo pv /dev/sdc | tee >(dd of=/dev/sda) >(dd of=/dev/sdb) | dd of=/dev/null
This cloned my OS drive successfully, without grub errors like the 1st attempt. Grub loaded, but would not boot the OS, and I was thrown into dracut emergency mode. * I got out of this by issuing the following commands from my LiveUSB
-sh
    sfdisk -d /dev/sdc | sfdisk /dev/sda
and ditto for sdb. * Fedora loaded this time, but I was thrown into emergency mode, which is caused in my case by inexistant /etc/fstab entries. So I pruned the fstab to only mount the / partition. * Now I ran:
-sh
    sudo mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda /dev/sdb
from my Live USB stick to create the array, but after the drives were still not bootable. So I had to re dd the sdc2 and sdc3 partitions, to their respective sdb partitions. And I'm back at square one. * This time I decided to create 3 separate RAID partitions. And created a file called /etc/grub.d/09_raid1_setup:
menuentry 'Fedora RAID 1' --class fedora --class gnu-linux --class gnu --class os {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        insmod mdraid1x
        set root='(md/2)'
        search --no-floppy --set=root /dev/md2 
        linux /vmlinuz-3.18.9-100.fc20.x86_64 root=/dev/md3 ro
        initrd /initramfs-3.18.9-100.fc20.x86_64.img
    }
* Then I recreated the new /boot/grub2/grub.cfg with grub2-mkconfig -o /boot/grub2/grub.cfg and ran dracut -f /boot/initramfs-currentimage to update the initramfs. * I made the mistake of not changing the partition table of sdb to match that of sda, which looks like:
Part. #     Size        Partition Type            Partition Name
    ----------------------------------------------------------------
             1007.0 KiB  free space
    1        1024.0 KiB  BIOS boot partition
    2        500.0 MiB   Linux RAID
    3        97.7 GiB    Linux RAID
    4        2.6 TiB     Linux RAID
             455.5 KiB   free space
until after I had created the initramfs image and updated grub.cfg. * The output of lsblk now looks like:
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
    sda       8:0    0   2.7T  0 disk  
    ├─sda1    8:1    0     1M  0 part  
    ├─sda2    8:2    0   500M  0 part  
    ├─sda3    8:3    0  97.7G  0 part  /
    └─sda4    8:4    0   2.6T  0 part  
    sdb       8:16   0   2.7T  0 disk  
    ├─sdb1    8:17   0     1M  0 part  
    ├─sdb2    8:18   0   500M  0 part  
    │ └─md2   9:2    0 499.7M  0 raid1 /boot
    ├─sdb3    8:19   0  97.7G  0 part  
    │ └─md3   9:3    0  97.6G  0 raid1 
    └─sdb4    8:20   0   2.6T  0 part  
      └─md4   9:4    0   2.6T  0 raid1 
    sdc       8:32   0   2.7T  0 disk  /home
* And /etc/fstab is:
/dev/md3 /                       ext4    defaults        1 1
    /dev/md2 /boot                   ext4    defaults        1 2
    UUID=f9fba42e-80f4-41b1-b309-88b22f642907 /home                 ext4    defaults        1 2
After research , reading , and general googling , I can't find answers.
rivanov (271 rep)
Nov 10, 2015, 12:15 AM • Last activity: Jan 8, 2025, 10:21 AM
0 votes
0 answers
88 views
Copy Linux Mint boot area from external SSD drive
I'm sorry if this question is not on topic. I am moving from Windows to Linux and had the idea to use a bootable Linux Mint external SSD to slowly download and integrate all the software I use, while at the same time using Windows as my daily driver. Once I am comfortable with Linux, I will then dis...
I'm sorry if this question is not on topic. I am moving from Windows to Linux and had the idea to use a bootable Linux Mint external SSD to slowly download and integrate all the software I use, while at the same time using Windows as my daily driver. Once I am comfortable with Linux, I will then discard windows and use Linux Mint as my daily driver. I will then need to clone the bootable Linux Mint on to my main SSD. Would Clonezilla allow me to clone the bootable SSD on to my main SSD and use the rest of the allocated space on my drive as free space for Linux Mint?
userWantsToCode (101 rep)
Jul 11, 2024, 02:46 PM • Last activity: Jul 11, 2024, 03:44 PM
0 votes
1 answers
195 views
How to virtualize Win10 from Linux (into VirtualBox on Linux) and shrink it?
Basically, what I need could be similar to what most other people running Windows for work would want, I suppose, so let us get started on my requirements: 1. Somehow copy a raw disk (e.g. `/dev/sda`) onto a bigger medium. In my case, Windows is stored on a 1TB SATA SSD and I want to clone it into t...
Basically, what I need could be similar to what most other people running Windows for work would want, I suppose, so let us get started on my requirements: 1. Somehow copy a raw disk (e.g. /dev/sda) onto a bigger medium. In my case, Windows is stored on a 1TB SATA SSD and I want to clone it into the VirtualBox VDI format and store it onto my bigger NVMe SSD medium which has about 1.5TB of free space. 2. After making proper adjustments to the VirtualBox VM settings, start the VM up. 3. Free as much of the VM's disk space as possible, such as uninstalling games, etc.. which are irrelevant to the VM's use case. 4. Then, shrink the VM's disk to the minimum (used space only).
Vlastimil Burián (30505 rep)
Jan 22, 2023, 10:24 AM • Last activity: May 20, 2024, 01:29 AM
59 votes
12 answers
132523 views
How to change filesystem UUID (2 same UUID)?
I have a fedora guest OS in VMware. I want to expand `/boot` partition, so I add another virtual disk to this VM, and try to clone the disk. After `dd if=/dev/sda1 of=/dev/sdb1`, `blkid` report that **/dev/sda1** and **/dev/sdb1** have same UUID/GUID. It's weird that there're 2 same UUIDs in the uni...
I have a fedora guest OS in VMware. I want to expand /boot partition, so I add another virtual disk to this VM, and try to clone the disk. After dd if=/dev/sda1 of=/dev/sdb1, blkid report that **/dev/sda1** and **/dev/sdb1** have same UUID/GUID. It's weird that there're 2 same UUIDs in the universe, how to change one of them to another UUID value? ---- # Update 2017-01-25 Subject changed, UUID here means filesystem UUID, not partition UUID. Since it's filesystem UUID, filesystem specific utils are needed to change the UUID, or use hexeditor to modify raw data on disk (**DANGEROUS, not recommended unless you know what you are doing**).
LiuYan 刘研 (4160 rep)
May 4, 2011, 02:29 AM • Last activity: Mar 22, 2024, 08:44 PM
13 votes
5 answers
35851 views
How can I clone/backup/restore Windows 10 from Linux?
Case **scenario**: $ sudo fdisk -l Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x13a30a5a Device Boot...
Case **scenario**: $ sudo fdisk -l Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x13a30a5a Device Boot Start Final Sectors Size Id Type /dev/sda1 * 2048 1333247 1331200 650M 27 WinRE NTFS hidden /dev/sda2 1333248 264058879 262725632 125,3G 7 HPFS/NTFS/exFAT /dev/sda3 264060926 468860927 204800002 97,7G 5 Extended /dev/sda5 264060928 434049023 169988096 81,1G 7 HPFS/NTFS/exFAT /dev/sda6 434051072 464771775 30720704 14,7G 83 Linux /dev/sda7 464773120 468860927 4087808 2G 82 Linux swap / Solaris **Windows 10** is installed on /dev/sda2 and I assume that /dev/sda1 is a hidden partition from the same Windows system. How can I **backup my Windows 10** installation **from Linux** in order to restore it later? Further data upon request: - By "Installation" I mean the "full partition" (or partitions) required to return Windows to the moment the cloning was made. - Being able to restore to the same system (computer, hardware) and even hard drive would enough. I.e: I installed Windows 10, made backup, and a few months ago I want to restore the backup I made, so there is no need to perform the full installation of Windows 10 (drivers, printers, programs...etc) again. **Tested** until now (all tests performed on the same computer with the same partition layout): - PartImage (cloning sda1 and sda2): not working. The restored operating system will not boot. - FSArchiver (cloning sda1 and sda2): not working. The restored operating system will not boot.
Sopalajo de Arrierez (6821 rep)
May 15, 2018, 08:42 PM • Last activity: Feb 6, 2024, 07:54 PM
0 votes
2 answers
179 views
How to clone CentOS 7.7 installation on another disk?
I thought I could clone a running CentOS 7.7 installation by replicating the contents of the /, /boot, /boot/efi partitions on the target disk and then modifying the /etc/fstab and the grub.cfg files to allow for the UUID changes. Evidently there is something I am missing since the cloned disk boots...
I thought I could clone a running CentOS 7.7 installation by replicating the contents of the /, /boot, /boot/efi partitions on the target disk and then modifying the /etc/fstab and the grub.cfg files to allow for the UUID changes. Evidently there is something I am missing since the cloned disk boots up OK except for login processing. The tigerVNC server has been successfully cloned and I can remotely login to the cloned installation. The symptoms are I don’t get the usual login prompt on the main console, and when I try to login with ssh, I am prompted for the user id and then the password, but when I enter the password I get the response back “/bin/bash: Permission denied.” Similarly, when I boot to run level 3, after entering the password it loops back to the login: prompt. So, most everything is working except for password authentication. Relevant output from journalctl are: systemd-logind: Failed to start user slice user-42.slice, ignoring: Access denied (org.freedesktop.DBus.Error.AccessDenied) systemd-logind: Failed to start session scope session-c1.scope: Access denied gdm-launch-environment]: pam_systemd(gdm-launch-environment:session): Failed to create session: Access denied gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0) Querying systemd-logind status returns “active (running)” and also says “Started Login Service” I will appreciate any idea on what it is that I have overlooked.
ORAY (1 rep)
Jan 26, 2024, 10:46 PM • Last activity: Jan 30, 2024, 03:28 PM
2 votes
2 answers
433 views
Minimal SD Card image
If the command to r[eplicate an SD card][1]: date; sudo sh -c 'pv /dev/mmcblk0 >pv sdcard.image'; date images a fresh install of Raspbian sitting on a 128GB SD-Card, then sdcard.image file will be 128GB. Assume that a fresh install of Raspbian takes 10 GB of space. Most of the image would not contai...
If the command to replicate an SD card : date; sudo sh -c 'pv /dev/mmcblk0 >pv sdcard.image'; date images a fresh install of Raspbian sitting on a 128GB SD-Card, then sdcard.image file will be 128GB. Assume that a fresh install of Raspbian takes 10 GB of space. Most of the image would not contain data ('empty space'). It would be useful if the resulting image: 1. is minimal in size (before any compression and not copy 'empty space') 2. could be installed to a minimal SD-Card (16GB SD card or larger) A minimal SD-card capacity is the smallest SD card that can accept a fresh install Raspbian: because there is no 10GB SD-Card, the next larger size (16GB) is defined as the minimal SD-Card. Solutions preferences are for simplicity and standard Unix commands (scripts if necessary). How can the 2 goals be achieved? Would a sensible strategy determine the amount of data (10GB) on the SD card and change the disk parameters a disk size slightly larger than 10GB: in this case 16 GB? References: - Backing up SD card generates a huge .img file - PiShrink:BASH script - zerofree command zeros free space
gatorback (1522 rep)
Feb 2, 2020, 02:08 PM • Last activity: Jan 26, 2024, 08:30 PM
0 votes
1 answers
97 views
DD between different file system
I need to install a new server Linux cloned by DD. In the old server i used xt4 and in the new server i want use i.e zfs. Can use DD command from old ext4 to new zfs? Thanks to Whom will responde.
I need to install a new server Linux cloned by DD. In the old server i used xt4 and in the new server i want use i.e zfs. Can use DD command from old ext4 to new zfs? Thanks to Whom will responde.
Olindo Pindaro (1 rep)
Nov 17, 2023, 01:46 AM • Last activity: Nov 17, 2023, 04:09 PM
2 votes
1 answers
544 views
cloning a partition to a partition of different format
If I clone a partition (I can be using `dd` command or clonezilla software or anything) with `ext4` format to partition of `xfs` format: 1. will I have any issue/error? 2. The resultant data/partition will be `ext4` or `xfs` formatted ?
If I clone a partition (I can be using dd command or clonezilla software or anything) with ext4 format to partition of xfs format: 1. will I have any issue/error? 2. The resultant data/partition will be ext4 or xfs formatted ?
Alex Jones (6483 rep)
Apr 17, 2015, 08:37 AM • Last activity: Nov 17, 2023, 01:30 AM
40 votes
10 answers
35263 views
Clone whole partition or hard drive to a sparse file
I like to clone a whole partition or a whole hard drive onto a larger external disk but like to create a sparse file. I often use `dd` for cloning, but it doesn't support sparse files. As a workaround I used something like: cp --sparse=always <(dd if=/dev/sda1 bs=8M) /mount/external/backup/sda1.raw...
I like to clone a whole partition or a whole hard drive onto a larger external disk but like to create a sparse file. I often use dd for cloning, but it doesn't support sparse files. As a workaround I used something like: cp --sparse=always <(dd if=/dev/sda1 bs=8M) /mount/external/backup/sda1.raw However this is a little too tricky for my taste and doesn't allow me to resume the process if aborted. It is funny that there is a NTFS tool for this (ntfsclone) but no such tool exists for the native file systems of Linux (EXT2-4). Is there some better tool for this, e.g. a dd variant with sparse support? I do not look for some proprietary software for disk backups but simply want to make a sparse clone copy which I can mount as loop device if required.
Martin Scharrer (920 rep)
Jul 20, 2011, 07:48 PM • Last activity: Nov 10, 2023, 10:28 AM
27 votes
5 answers
51864 views
Why specify block size when copying devices of a finite size?
In online tutorials it is often suggested to use the following command to copy a CDROM to an ISO image: $ dd if=/dev/dvd of=foobar.iso bs=2048 Why must the block size be specified? I noticed that in fact 2048 is the [standard logical block size for CDROM images](https://www.thomas-krenn.com/en/wiki/...
In online tutorials it is often suggested to use the following command to copy a CDROM to an ISO image: $ dd if=/dev/dvd of=foobar.iso bs=2048 Why must the block size be specified? I noticed that in fact 2048 is the [standard logical block size for CDROM images](https://www.thomas-krenn.com/en/wiki/Create_an_ISO_Image_from_a_source_CD_or_DVD_under_Linux) but it seems that dd without specifying bs= or count= works as well. **Under what circumstances would it be problematic to _not_ specify bs= or count= when copying from a device of finite size?**
dotancohen (16493 rep)
Mar 9, 2015, 02:02 PM • Last activity: Oct 18, 2023, 01:20 PM
24 votes
6 answers
66624 views
can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?
I've used `dd` to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target disk must be the same size or bigger than the source. Does that absolutely have to be true? Now, I quit...
I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target disk must be the same size or bigger than the source. Does that absolutely have to be true? Now, I quite understand that if I clone to a smaller disk I can't expect any partitions that are even *partially* 'out of bounds' on the target to be intact. However, knowing full well that I'd need to edit my partitions on the target later, deleting the 'out of bounds' ones, could I still use 'dd' to make a brute force copy of the source up to the limits of the physical size of the target? Or would 'dd' reduce the target to a smoking pile of wreckage when it reached the limit of its size ;-) BTW, researching this, I've seen recommended values for bs= of everything from bs=1024 up to bs=32M, what really is best?
Ray Andrews (2615 rep)
Oct 13, 2014, 04:16 PM • Last activity: Aug 28, 2023, 02:58 PM
6 votes
1 answers
9401 views
How to uncompress a gzipped partition image and dd it directly to the destination partition without writing to current partition?
I've backed up a partition using `sudo dd bs=8M if=/dev/sda2 | gzip > /someFolderOnSDB/sda2.img.gz`. The image is stored on a separate disk `sdb`. When restoring it using `gunzip -k /mnt/bkp/sda2.img.gz | sudo dd of=/dev/sda2`, I noticed that the image is being unzipped into the folder `someFolderOn...
I've backed up a partition using sudo dd bs=8M if=/dev/sda2 | gzip > /someFolderOnSDB/sda2.img.gz. The image is stored on a separate disk sdb. When restoring it using gunzip -k /mnt/bkp/sda2.img.gz | sudo dd of=/dev/sda2, I noticed that the image is being unzipped into the folder someFolderOnSDB where the gz file is, and I think is simultaneously being written with dd to sda2. I don't want that. I want the unzipping to happen in memory, rather than on sdb and the portions being unzipped get directly written to sda with dd. The unzipped image is 300GB in size. I considered using tee or/and the redirect operator >, but am unsure how.
Nav (389 rep)
Feb 2, 2021, 02:46 PM • Last activity: Jul 30, 2023, 07:37 PM
0 votes
0 answers
160 views
Newly Cloned NVMe won't boot on laptop
In my fairly old laptop running Fedora 38 I have an normal 2.5" SSD drive. The laptop has a NVMe slot so I added a NVMe drive into the laptop. 1. I Installed the NVMe drive into the laptop and booted the system 2. After rebooting, Fedora can see the new NVMe drive in the Disk Utility. 3. In Terminal...
In my fairly old laptop running Fedora 38 I have an normal 2.5" SSD drive. The laptop has a NVMe slot so I added a NVMe drive into the laptop. 1. I Installed the NVMe drive into the laptop and booted the system 2. After rebooting, Fedora can see the new NVMe drive in the Disk Utility. 3. In Terminal I ran echo 'add_drivers+=" nvme "' > /etc/dracut.conf.d/nvme.conf sudo dracut -f --no-hostonly --add-drivers nvme --kver 6.3.8-200.fc38.x86_64 4) I that shutdown the computer. 5) Rebooted using a Clonezilla Live Boot USB 6) Cloned the old SSD to the new NVME 7) Shutdown again 8) Removed the old SSD When I booted I get this error Screenshot enter image description here I think I’m still missing something? Do I need recreate/edit grub or make the drive bootable? Can I fix this or do I need to do all that again?
DarkUFO (101 rep)
Jun 18, 2023, 08:46 PM • Last activity: Jun 19, 2023, 01:32 AM
10 votes
3 answers
18140 views
Can I restore a single partition from a Clonezilla disk image?
I was thinking of performing a Clonezilla backup and was wondering what backup mode to choose. Generally speaking, Clonezilla offers the following backup options: - savedisk: Save a full disk image - saveparts: Save images of specific partitions Correspondingly there are two restore modes: - restore...
I was thinking of performing a Clonezilla backup and was wondering what backup mode to choose. Generally speaking, Clonezilla offers the following backup options: - savedisk: Save a full disk image - saveparts: Save images of specific partitions Correspondingly there are two restore modes: - restoredisk: Restores full disk image - restoreparts: Restores partition images What I am looking for is a hybrid of these two options. I would like to be able to both restore specific partitions and restore my full hard drive in case of a total failure. Does Clonezilla support this restoration pathway out of the box? So far I haven't been able to find any official documentation regarding this. The only reference I did find was a [mailing list discussion](https://www.mail-archive.com/clonezilla-live@lists.sourceforge.net/msg00905.html) from 2010 which pointed to [imgconvert](http://clonezilla-sysresccd.hellug.gr/reloc-img.html) , a custom script which can supposedly convert disk images to partition images. Unfortuantely I have no idea if this script still works. After all it's 5 years old. That's why I wanted to ask here if anyone had any experience with this use case of Clonezilla and could vouch for this solution (or a different one, for that matter).
Glutanimate (2328 rep)
Nov 22, 2014, 09:21 AM • Last activity: Feb 7, 2023, 06:17 PM
Showing page 1 of 20 total questions