Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
It works fine for me with that same version of sfdisk in xubuntu 14.04. The only way I could duplicate your result was by deleting the newline at the very end of the file. Make sure one is there. If that doesn't fix the problem, to prove that the file is not corrupted post the output from "hexdump -C parts.out"
As expected, there is no newline (hex 0a) character at the end of the file. Read the file into an editor, add a newline at the end, and write it back out.
As expected, there is no newline (hex 0a) character at the end of the file. Read the file into an editor, add a newline at the end, and write it back out.
Code:
root@ubuntu:~# sfdisk /dev/sda < parts.out
Checking that no-one is using this disk right now ...
OK
Disk /dev/sda: 65270 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 31- 31- 248832 83 Linux
/dev/sda2 31+ 13054- 13023- 104605697 5 Extended
/dev/sda3 31+ 31- 1- 1023 83 Linux
/dev/sda4 13054+ 65270- 52217- 419431424 8e Linux LVM
start: (c,h,s) expected (1023,254,63) found (766,10,13)
end: (c,h,s) expected (1023,254,63) found (758,213,31)
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sda1 2048 499711 497664 83 Linux
/dev/sda2 501758 209713151 209211394 5 Extended
/dev/sda3 499712 501757 2046 83 Linux
/dev/sda4 209713152 1048575999 838862848 8e Linux LVM
/dev/sda5 501760 209713151 209211392 8e Linux LVM
Warning: partition 1 does not end at a cylinder boundary
Warning: partition 2 does not start at a cylinder boundary
Warning: partition 2 does not end at a cylinder boundary
Warning: partition 3 does not start at a cylinder boundary
Warning: partition 3 does not end at a cylinder boundary
Warning: partition 4 does not start at a cylinder boundary
Warning: partition 4 does not end at a cylinder boundary
Warning: partition 5 does not end at a cylinder boundary
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Is the problem now fixed? I believe that vgdisplay should no longer complain about a missing device.
Because of the way you are violating LQ rules by spamming the forums with links to this thread, I do not intend to investigate this any further.
Code:
root@ubuntu:~# vgdisplay
--- Volume group ---
VG Name server-vg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 499.76 GiB
PE Size 4.00 MiB
Total PE 127938
Alloc PE / Size 127933 / 499.74 GiB
Free PE / Size 5 / 20.00 MiB
VG UUID iCp4mf-34fz-p0Xh-X7lm-uDdG-bKYm-d4yKc2
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.