[SOLVED] After cloning old HD to new HD: "Partition does not start on physical sector boundary"
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I used Clonezilla with the default settings to clone my old 145GB HD to a new 1,000GB HD, and have a couple of issues:
1. The root partition is still 145GB
2. fdisk -l complains with "Partition 3 does not start on physical sector boundary.":
Code:
~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 145G 124G 14G 91% /
udev 10M 0 10M 0% /dev
tmpfs 198M 4.7M 194M 3% /run
tmpfs 495M 0 495M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 495M 0 495M 0% /sys/fs/cgroup
~# fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x743dbbe5
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 310501375 310499328 148.1G 83 Linux
/dev/sda2 310503422 312580095 2076674 1014M 5 Extended
/dev/sda5 310503424 312580095 2076672 1014M 82 Linux swap / Solaris
Partition 3 does not start on physical sector boundary.
Is there a way to solve those issues without recloning with Clonezilla, and if yes, how?
FWIW, the computer is running Debian 8.8.
Thank you.
Steps to take:
1) Boot to a liveCD or put the hard drive in another computer
2) edit etc/fstab to comment out the swap entry (put a # in front of the line). You can add a new entry for a new swap partition later. Unfortunately, you may not be able to reliably move or resize the current swap partition without changing its UUID, which will tend to invalidate fstab entries and RESUME device settings. So anyway, I've found swap partitions to be more trouble than they're worth. Since I have NEVER used the hibernate feature, I get no worth out of swap partitions at all! A swap file is so much easier and better.
3) Use gparted (or other partitioning tools) to remove the swap and extended partitions.
4) Use gparted to resize the one remaining partition (the os partition). I'd personally resize it to the maximum size. But there's something to be said for leaving a small amount of space free (maybe 8GB) in case you want to install a second OS partition for some reason. For example, you might want to try out Debian 9 while keeping your Debian 8 setup intact.
Thanks. This host is text-only, so I can't run graphic apps like Gparted. Is there a text-based alternative?
Code:
root@debian:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=7758e3e1-9cba-42f5-a99f-abd8040f4c2b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=af9660c1-4d15-4026-9892-969e7efe6a42 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
root@debian:~# blkid
/dev/sda1: UUID="7758e3e1-9cba-42f5-a99f-abd8040f4c2b" TYPE="ext4" PARTUUID="743dbbe5-01"
/dev/sda5: UUID="af9660c1-4d15-4026-9892-969e7efe6a42" TYPE="swap" PARTUUID="743dbbe5-05"
--
Edit: My mistake. I'll burn a bootable USB keydrive with Mint and run Gparted and see how it goes.
I don't use hibernate, but I do put the computer to sleep because I use it as a NAS an hour a day to perform backups.
Last edited by littlebigman; 07-13-2017 at 07:23 AM.
Thanks. This host is text-only, so I can't run graphic apps like Gparted. Is there a text-based alternative?
Code:
root@debian:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=7758e3e1-9cba-42f5-a99f-abd8040f4c2b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=af9660c1-4d15-4026-9892-969e7efe6a42 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
root@debian:~# blkid
/dev/sda1: UUID="7758e3e1-9cba-42f5-a99f-abd8040f4c2b" TYPE="ext4" PARTUUID="743dbbe5-01"
/dev/sda5: UUID="af9660c1-4d15-4026-9892-969e7efe6a42" TYPE="swap" PARTUUID="743dbbe5-05"
--
Edit: My mistake. I'll burn a bootable USB keydrive with Mint and run Gparted and see how it goes.
I don't use hibernate, but I do put the computer to sleep because I use it as a NAS an hour a day to perform backups.
Cool!
Suspend functionality is not affected by the presence or absence of swap. Hibernate is the feature that requires a standard swap partition.
In this particular case, it really doesn't matter.
Quote:
Originally Posted by littlebigman
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x743dbbe5
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 310501375 310499328 148.1G 83 Linux
/dev/sda2 310503422 312580095 2076674 1014M 5 Extended
/dev/sda5 310503424 312580095 2076672 1014M 82 Linux swap / Solaris[/CODE]
The only thing misaligned here is the extended partition header. In normal operation, that header is read once when the system boots and is never written. The actual swap partition, /dev/sda5, is properly aligned. It might be considered an ideal alignment, wasting just one 4KB block for the extended partition header, and preserving 1MB alignment for the actual partitions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.