LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-23-2016, 02:39 PM   #31
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by rknichols View Post
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
 
Old 10-23-2016, 03:29 PM   #32
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
Old 10-23-2016, 03:31 PM   #33
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
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).)
 
Old 10-23-2016, 03:45 PM   #34
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
Old 10-23-2016, 03:46 PM   #35
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
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
 
Old 10-23-2016, 04:04 PM   #36
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
"rknichols" Thank you for your interest
 
Old 10-23-2016, 04:42 PM   #37
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
How can I access the HDD?
Can I mount?
How can I get access to the files?
 
Old 10-23-2016, 07:50 PM   #38
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
As far as I can see, the LVM structure has been fixed. Does that disk still fail to boot? What happens now?
 
Old 10-24-2016, 09:15 AM   #39
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
"rknichols"
I mount the disk

Thank you very much for your help

You know this job

thanks thanks thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see failed internal disk in HP Blade linux server bkarthick Linux - Newbie 1 03-09-2013 02:37 AM
need help with mounting disk after failed ubuntu 11 upgrade ?? M$ISBS Ubuntu 5 07-13-2011 01:30 PM
recover files from a failed ubuntu disk ulfscha Linux - Newbie 1 02-26-2011 10:16 AM
Failed to sync one or more sources: Failed to write some configuration data to disk ganeshbatwal Linux - Software 2 11-06-2008 10:05 AM
Ubuntu 7.10 Live demo: disk format failed jessica_lilly Ubuntu 1 11-02-2007 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration