Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
10-23-2016, 02:39 PM
|
#31
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
Quote:
Originally Posted by rknichols
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"
|
Code:
root@ubuntu:~# hexdump -C parts.out
00000000 75 6e 69 74 3a 20 73 65 63 74 6f 72 73 0a 0a 2f |unit: sectors../|
00000010 64 65 76 2f 73 64 61 31 20 3a 20 73 74 61 72 74 |dev/sda1 : start|
00000020 3d 20 20 20 20 20 20 20 20 32 30 34 38 2c 20 73 |= 2048, s|
00000030 69 7a 65 3d 20 20 20 20 20 20 34 39 37 36 36 34 |ize= 497664|
00000040 2c 20 49 64 3d 38 33 0a 2f 64 65 76 2f 73 64 61 |, Id=83./dev/sda|
00000050 32 20 3a 20 73 74 61 72 74 3d 20 20 20 20 20 20 |2 : start= |
00000060 35 30 31 37 35 38 2c 20 73 69 7a 65 3d 20 20 20 |501758, size= |
00000070 32 30 39 32 31 31 33 39 34 2c 20 49 64 3d 35 0a |209211394, Id=5.|
00000080 2f 64 65 76 2f 73 64 61 33 20 3a 20 73 74 61 72 |/dev/sda3 : star|
00000090 74 3d 20 20 20 20 20 20 34 39 39 37 31 32 2c 20 |t= 499712, |
000000a0 73 69 7a 65 3d 20 20 20 20 20 20 20 20 32 30 34 |size= 204|
000000b0 36 2c 20 49 64 3d 38 33 0a 2f 64 65 76 2f 73 64 |6, Id=83./dev/sd|
000000c0 61 34 20 3a 20 73 74 61 72 74 3d 20 20 20 32 30 |a4 : start= 20|
000000d0 39 37 31 33 31 35 32 2c 20 73 69 7a 65 3d 20 20 |9713152, size= |
000000e0 20 38 33 38 38 36 32 38 34 38 2c 20 49 64 3d 38 | 838862848, Id=8|
000000f0 65 0a 2f 64 65 76 2f 73 64 61 35 20 3a 20 73 74 |e./dev/sda5 : st|
00000100 61 72 74 3d 20 20 20 20 20 20 35 30 31 37 36 30 |art= 501760|
00000110 2c 20 73 69 7a 65 3d 20 20 20 32 30 39 32 31 31 |, size= 209211|
00000120 33 39 32 2c 20 49 64 3d 38 65 |392, Id=8e|
0000012a
|
|
|
10-23-2016, 03:29 PM
|
#32
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
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.
|
|
|
10-23-2016, 03:31 PM
|
#33
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
Quote:
Originally Posted by rknichols
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).)
|
|
|
10-23-2016, 03:45 PM
|
#34
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
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.
Last edited by rknichols; 10-23-2016 at 03:46 PM.
|
|
2 members found this post helpful.
|
10-23-2016, 03:46 PM
|
#35
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
Quote:
Originally Posted by rknichols
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
|
|
|
10-23-2016, 04:04 PM
|
#36
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
" rknichols" Thank you for your interest
|
|
|
10-23-2016, 04:42 PM
|
#37
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
How can I access the HDD?
Can I mount?
How can I get access to the files?
|
|
|
10-23-2016, 07:50 PM
|
#38
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,828
|
As far as I can see, the LVM structure has been fixed. Does that disk still fail to boot? What happens now?
|
|
|
10-24-2016, 09:15 AM
|
#39
|
LQ Newbie
Registered: Oct 2016
Posts: 25
Original Poster
Rep: 
|
" rknichols"
I mount the disk
Thank you very much for your help
You know this job
thanks thanks thanks
|
|
|
All times are GMT -5. The time now is 04:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|