Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error segfault when cloning sata between x86 boards
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Wed Jul 11, 2018 6:19 pm    Post subject: Error segfault when cloning sata between x86 boards Reply with quote

Hello,

We are struggling on trying to clone a disk (sata) with gentoo into mmc.
We tried to do this with clonezilla, and the first problem was that the mmc is smaller in size than disk (15.2G < 16G).
It seems we overcome this by shrinking the rootfs partition, yet on boot it hangs on boot.
I than suspected that mmc is not supported in kernel , so I added and build kernel, but it still hang on boot.

Is there any idea how to clone the disk to mmc ? Is it possible ?

Thank you,
ranran


Last edited by ranran on Wed Aug 08, 2018 4:22 pm; edited 3 times in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Jul 11, 2018 6:30 pm    Post subject: Reply with quote

Mount both, old an new, use 'cp -a". Never failed on me.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Wed Jul 11, 2018 6:37 pm    Post subject: Reply with quote

Do you mean mount the rootfs partition of both ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Wed Jul 11, 2018 6:44 pm    Post subject: Reply with quote

ranran,

There are a number of issues you face.

An exact clone is not what you want. You will need to do the clone then make changes before it will boot.
You may not clone a volume that has files open for writiting. They will be corrupt in the copy. Thus you need to boot from some other media.
Your bootloader (grub?) modifies itself on install. It won't work on any other drive without being reinstalled.

Your /etct/fstab will be incorrect.
Your kernel command line will be incorrect. root=/dev/sdX.. will need to become root=/dev/mmcblkX/pY

Since you don't want a clone. Go with what Jaglover suggested.
Edit the /etct/fstab and kernel command line to suit the new home, then chroot into the mmc install and reinstall the boot loader.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Wed Jul 11, 2018 7:43 pm    Post subject: Reply with quote

Hi,

I understand.
And I also need to support mmc in kernel of course, Right ?
I ask because I noticed that the kernel does not support mmc (CONFIG_MMC) now.

Thanks,
ranran
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Wed Jul 11, 2018 7:47 pm    Post subject: Reply with quote

ranran,

Correct. CONFIG_MMC alone is not enough. You need the right hardware option(s) in that menu for your mmc chipset too,
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Thu Jul 12, 2018 11:30 am    Post subject: "wait_for: No record of process 0" on boot Reply with quote

Hello,

We have 2 systems, both x86 64-bit, (using different comm express with different HW).
We try to clone disk from one to another, but it get stuck on login without keyboard , and we don't get the X (graphic).

Is it possible to do such clone ?
What can be the cause of this failure ?

Please see images describing the boot process till login (no keyboard)

https://drive.google.com/drive/folders/1DekaQEfUmyJo_HeaaDfL2ynwvtFZFlok?usp=sharing

Thanks,
ranran


Last edited by ranran on Thu Jul 12, 2018 8:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Thu Jul 12, 2018 1:01 pm    Post subject: Reply with quote

Hi,

I now tried to clone from disk (flash) to disk (sata) of the new system but I still don't have a complete boot.
The boot stops in login , no keyboard, and no X.

I have described the problem here and attached dmesg:
https://forums.gentoo.org/viewtopic-p-8240068.html#8240068

Is there any idea what might be wrong ?

Thanks,
ranran
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2289
Location: near Augsburg, Germany

PostPosted: Thu Jul 12, 2018 1:18 pm    Post subject: Reply with quote

Which hardware do both systems have?
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Thu Jul 12, 2018 6:56 pm    Post subject: Reply with quote

Hi,

The original (which I clone from) is portwell
Atom e3800 , COMx

The new HW (I clone to):
Mini COMex TYPE10
Apollo Lake E3940/E3950

So, the soc in each COMex is different (as mentioned above), but aside of the main soc, there are other HW differences between these COMex boards.

I see the error in the attached images which says:
/etc/init.d/net.lo line 36: wait_for no record of process 0
rc[89] segfault at ip 0

Maybe this indicates changes related to network ?

What is the meaning of this error ? I haven't found any clue, so we are a bit stuck on this and not sure how to continue debug this issue.

Any idea or suggestion can help ,
ranran
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Fri Jul 13, 2018 5:09 am    Post subject: segfault at boot Reply with quote

Hello,

We cloned disk from x86 board to another different x86 board, but for some reason it get stuck on boot, where is gives login prompt, but without X, and keyboard (I can't login)

the log on reset:
EXT-fs (sda)4: error: couln't mount becuase unsipported optional feature (240)
EXT-fs (sda)4: mounted filesystem with ordered data mode: Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:4
Freeing unused kernel memory: 984k (ffffffff81ef0000 -ffffffff91fe6000)
tsc: Refined TSC clocksource calibration: 1593.600 Mhz
usb 1-5.1: new low speed USB device number 3 using xhci_hcd
usb 1-5.1: new USB device found, idVendor=845e, idProduct=87f8
usb 1-5.1: new USB device strings: Mfr=1, Product=2, SerialNumber=0
.....
random: nonblocking pool is initialzed
Switched to clocksource tsc

OpenRC 0.13.11 is starting up Fentoo Linux (x86_64)
* Mounting /proc ...
* Mounting /run ...
* run/openrc: creating directory
* run/lock: creating directory
* run/lock: correcting owner
* Caching service depenencies ...
/etc/init.d/net.lo: line 36: wait_for: No record of process 0
rc[89]: segfault at 0 ip (null) sp 00007ffc0452c0d0 error 14 is openrc
(400000+1c000)
* Caching service depenencies ...
/etc/init.d/net.lo: line 36: wait_for: No record of process 0
rc[249]: segfault at 0 ip (null) sp 00007ffc0452c0d0 error 14 is openrc
(400000+1c000)
INIT: Entering runlevel: 3
* Caching service depenencies ...
rc[307]: segfault at 0 ip (null) sp 00007ffc0452c0d0 error 14 is openrc
(400000+1c000)


This is (none) unknown_domain (Linux x86_64 3.18.11-rt7) 21:00:47
login:



Maybe this indicates changes related to network ?
Or it is because the kernel is RT kernel ? (we once ported from x86 HW to another by cloning image and there was no issue)
What is the meaning of this error ?
I tried to search in google, but seems we are the only one who got this error....
The error doesn't give any clue for the real problem, so we are a bit stuck on this and not sure how to continue debug this issue.


The original (which I clone from) is portwell
Atom e3800 , COMx

The new HW (I clone to):
Mini COMex TYPE10
Apollo Lake E3940/E3950


Any idea or suggestion can help ,
ranran
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Jul 13, 2018 10:03 am    Post subject: Reply with quote

Quote:
EXT-fs (sda)4: error: couln't mount becuase unsipported optional feature (240)
EXT-fs (sda)4: mounted filesystem with ordered data mode: Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:4

i've had this error happen when i had created the target-fs with another os (systemrescuecd) which used other defaults when creating an ext4-fs (huge_file, i think). boot from removable and check/fix with tune2fs; it's probably best to turn the unsupported feature off; in my case it was
Code:
tune2fs -O ^huge_file /target/fs
(check syntax before)

regarding the segfaults check if the processors and used compiler-flags are really compatible.

GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Fri Jul 13, 2018 11:23 am    Post subject: Reply with quote

About the filesystem, we see a line afyer the error, that it eventually mounted the filesystem.
So, probably we can just ignore that error , Right?

As to the other "wait_for" error, you have said that it might be iisue of wrong compiling options in kernel.
But it is same atom chip which just changed from e38xx to e39x.
Do you mean processor type in menuconfig might differentiate between these 2 types?

Thanks
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2571
Location: Here and Away Again

PostPosted: Fri Jul 13, 2018 11:45 am    Post subject: ><)))°€ Reply with quote

Merged the topic "wait_for: No record of process 0" on boot and segfault at boot in since they seem to be about this same project.

It will be a lot easier for the interested parties to follow the topic if you keep it all here, at least until there is a specific enough reason to start a new one.

Also, please use the 'code' tags for terminal output and such, as it will make reading those a lot easier too. :]

Thanks!
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Jul 13, 2018 1:22 pm    Post subject: Reply with quote

Quote:
VFS: Mounted root (ext4 filesystem) readonly on device 8:4


Quote:
About the filesystem, we see a line afyer the error, that it eventually mounted the filesystem.
So, probably we can just ignore that error , Right?


If you intend to mount it read-only you can ignore it, otherwise it should be fixed.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Fri Jul 13, 2018 1:37 pm    Post subject: Reply with quote

The old processor is atom e38x while the new peocessor is atom e39x.
Is seems like a minor change, which probably doesn't explain the segfault, Right?
Maybe the rt linux can explain the failure? We use 3.18.11 rt7
With ubuntu install we have no issues, so maybe it strength the suspecting the RT kernel.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Sat Jul 14, 2018 7:29 am    Post subject: Reply with quote

ranran,

Take a deep breath and tell us the problem you want to solve. Help with your percieved solution does not apppear to be solving your problem..
Once we understand what you want to do, we may be able to list the steps to take.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Sat Jul 14, 2018 8:15 am    Post subject: Reply with quote

Hi

Probably becuase my 2 previous seperated questions were merged to one it is makes it now less understood to anyone who read the above messages.
Anyway, I will focus on what I try to achieve now.

I move from one x86 cpu , atom e38xx board to another.
I try to clone disk between these 2 x86 boards.
The second x86 board ,e39xx should eventually use mmc but as an initial stage I try to boot it with sata disk just as done in the first board.
I simply cloned the disk and try to use it with the second board.
Yet, I get a segfault etc\init.d\net.lo ftom which I don't have a clue what is the real problem.
There is also no keyboard and missing X desktop.
I only get login prompt but can't actually login because of no keyboard.
"
...
\etc\init.d\net.lo line 36: Wait_for No record of process 0
Rc[89] segfault at 0 ip(null) sp....
....
This is (none) unknown_domain (Linux x86_64 3.18.1- rt7)
login:
"

Googling this segfault, I was unable to get any clue about the problem.
Is it related to kernel ?
Is it related to the fact that we use rt linux?

Any auggestion what this segfault means will help.
I am a bit stuck on this unexpected issue.

Thank you,
Ranran
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Sat Jul 14, 2018 9:02 am    Post subject: Reply with quote

ranran,

Segfaults mean that something somewhere tried to access memory it does not own and the kernel killed the process.
You almost certainly do not want a clone of an existing system but given identical hardware, a clone should work.
You will get an incomplete broken clone if you try clone a filesystem that is in use because open files are incomplete, as are their directory entries.
There will be something in the journal but it wan't be consistent with the rest of the filesystem due to the time taken to make the clone.
When the journal is replayed in the clone in an attempt to repair the damage to the filesystem, it changes it from one broken state to another.

For a successful clone, the filesystem must not have any open files. Its safer to mount it read only.

For each system, post the following ...
Code:
lspci -k
less /proc/cpuinfo


Identify the from and to systems too.
It may well be that what you want to do can work in one direction but not in the other.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Sat Jul 14, 2018 10:18 am    Post subject: Reply with quote

Hi,

We clone using clonezilla. So as I understand there souldn't be any issue of open files when using this tool. So I am not sure yet why there is segfault on open files. The problem is that in the 1st board(source) the disk is flash so I cannot verrify the boot on the 1st block with the cloned sata because there is no sata input on board.
Yet, We once did similar clone from qst board to another hw without any issues of open files.

As to the other commands you have mention, I will check and post results.

Thanks for the feedback,
Ran


Last edited by ranran on Sat Jul 14, 2018 10:36 am; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Jul 14, 2018 10:36 am    Post subject: Reply with quote

your picture is showing openrc 0.13.11 ; since that version a lot has change in handling networking (netifrc...)
are you using some weird gentoo (like ovh) ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Sat Jul 14, 2018 10:39 am    Post subject: Reply with quote

krinn,

Well caught!
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Sat Jul 14, 2018 10:46 am    Post subject: Reply with quote

As far as I know this is a standard gentoo.
Do you suspect that network might behave differently when moving from atom a38x to atom a39x?
This gentoo disk was prepared by someone else on the 1st board.
We hoped (and still do) that cloning to other x86 hw is possible.
I understand that there might be some required changes but hope it is not required to do it all from scratch on the new board.

Ranran
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Sat Jul 14, 2018 11:04 am    Post subject: Reply with quote

ranran,

I don't have Conezilla, so I don't know how it works.

There is no such thing as a standard Gentoo. Everyone builds their Gentoo from the ground up, according to their needs.
Further, Gentoo is a rolling release, it changes every 30 minuites, so the last update time matters too.

Please post the output of
Code:
emerge --info
it will tell us a great deal about your Gentoo.
We also need the other things that I asked for to determine if a clone can work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ranran
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2018
Posts: 75

PostPosted: Sat Jul 14, 2018 11:59 am    Post subject: Reply with quote

I will check this things first thing tomorrow.
But how should I do "lspci" and "cat \proc\cpuinfo" on the new board if I don't get to linux prompt yet.
Should I install other OS like ubuntu and do it then ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum