You are not logged in.

#1 2014-02-27 22:15:51

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

[SOLVED] How to post information from rootfs recovery shell?

This topic (Post complete logs/output/versions/error messages by iphitus) https://bbs.archlinux.org/viewtopic.php?id=57855 is valuable but it's all great when you have actual access to a working install, even one without graphical user interface (desktop environment). What if one gets thrown into the darkest corners of command line? Arch fails to boot and displays the error and

[rootfs /]#

prompt.

Please don't get into what caused the particular failure to boot. I'll start a separate topic for that.

Last edited by bbarcher (2014-03-02 13:29:53)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#2 2014-02-28 09:36:11

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

You could mount a partition at /mnt and start writing your logs there. And then later pick them up with a livecd.

If you manage to get to chroot into your Arch environment you could use more fancy stuff like nc to pipe messages over the network.

And as a last resort, there is netconsole. But that would be overkill in your case since you get to a prompt.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-02-28 11:19:57

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

And how do I redirect logs to such a mounted partition?


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#4 2014-02-28 11:22:06

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

Example:

mount /dev/sd* /mnt
dmesg > /mnt/dmesg.txt

Or:

mount /dev/sd* /mnt
dmesg | nc 192.168.2.101 5000

and then on the other side:

nc -l 192.168.2.101 -p 5000 > dmesg_log.txt

fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#5 2014-02-28 11:24:11

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] How to post information from rootfs recovery shell?

Offline

#6 2014-02-28 13:53:50

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

Neburski wrote:

pacman doesn't work in rootfs AFAIK, so there's no way to install anything.

Last edited by bbarcher (2014-02-28 13:56:14)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#7 2014-02-28 14:02:11

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] How to post information from rootfs recovery shell?

bbarcher wrote:
Neburski wrote:

pacman doesn't work in rootfs AFAIK, so there's no way to install anything.

I should have let my morning coffee kick in before posting.

Anyway as Rexilion mentioned you can mount your partitions and then pipe your logs into a file on the mounted partitions.
You don't necessarily need to boot into a live cd. You can try to chroot into your existing arch install if you make sure to
mount all the partitions appropriatly (the same as you did during installation). There you should then be able to use pacman.

Last edited by Neburski (2014-02-28 14:09:55)

Offline

#8 2014-02-28 14:57:26

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] How to post information from rootfs recovery shell?

The users in my perimeter usually take a photo with the smartphone, embedd it in a word, excel or powerpoint document and attach it to the ticket.

Offline

#9 2014-02-28 14:59:51

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

bbarcher wrote:
Neburski wrote:

pacman doesn't work in rootfs AFAIK, so there's no way to install anything.

Same for me if you don't have netcat installed.

EDIT: Ow wait, busybox already has that smile . Kewl.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#10 2014-02-28 15:00:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to post information from rootfs recovery shell?

Awebb wrote:

The users in my perimeter usually take a photo with the smartphone, embedd it in a word, excel or powerpoint document and attach it to the ticket.

Where's the Spanish Inquisition when you need it?!

Offline

#11 2014-02-28 15:05:55

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

karol wrote:
Awebb wrote:

The users in my perimeter usually take a photo with the smartphone, embedd it in a word, excel or powerpoint document and attach it to the ticket.

Where's the Spanish Inquisition when you need it?!

Topic just went rogue tongue .


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#12 2014-03-01 14:19:20

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

Rexilion wrote:
karol wrote:
Awebb wrote:

The users in my perimeter usually take a photo with the smartphone, embedd it in a word, excel or powerpoint document and attach it to the ticket.

Where's the Spanish Inquisition when you need it?!

Topic just went rogue tongue .

Not it haven't.

@ Rexilion
Ah, OK. I thought you meant some real-time feed.
Pretty simple.

And how would I dirty-copy it from another booted system? What file holds dmesg contents?


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#13 2014-03-01 15:36:48

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

In the other booted system (e.g. livecd), you do:

mount /dev/sd* /mnt
cp /mnt/dmesg.txt /media/USB

It's that simple. You only need to remember what partition (sd*) you used.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#14 2014-03-01 15:52:11

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] How to post information from rootfs recovery shell?

I recommend drive labels or even the UUID. Device nodes can change on some systems, the UUID never does.

Offline

#15 2014-03-01 15:52:15

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

Rexilion wrote:

In the other booted system (e.g. livecd), you do:

mount /dev/sd* /mnt
cp /mnt/dmesg.txt /media/USB

It's that simple. You only need to remember what partition (sd*) you used.

Isn't that giving dmesg of the other booted system?


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#16 2014-03-01 16:41:47

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

Yes, 'the other booted system' would be the one you dropped to a rootfs.

You are just dumping a file to a partition in a state you want to log.
Then you use another OS to retrieve and communicate this file to some external source.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#17 2014-03-01 17:16:35

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

So the contents of dmesg can't be find in a file i.e. I can't bypass exporting dmesg to a file (dmesg > /mnt/dmesg.txt) on my porked Arch install first?
In other words, I can't extract a boot log of a porked system [1] using only a helthy system [2].
Clearly explained (/var/log/messages vs output of dmesg): http://unix.stackexchange.com/questions … g-messages

Last edited by bbarcher (2014-03-01 17:19:53)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#18 2014-03-01 17:21:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] How to post information from rootfs recovery shell?

'dmesg' may the the same / similar to 'less -f /dev/kmsg'.

You can tell dmesg to use syslog:

man dmesg wrote:

       -S, --syslog
              Force dmesg to use the syslog(2) kernel interface to read kernel messages.   The  default
              is to use /dev/kmsg rather than syslog(2) since kernel 3.5.0.

Last edited by karol (2014-03-01 17:24:51)

Offline

#19 2014-03-01 17:45:55

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

Awebb wrote:

I recommend drive labels or even the UUID. Device nodes can change on some systems, the UUID never does.

For a quick grab of logs it's IMHO not very convenient. I just issue `lsblk` first and off I go.


@karol
This won't be of use for me just yet but thank you.

Last edited by bbarcher (2014-03-01 17:46:31)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#20 2014-03-01 19:15:19

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] How to post information from rootfs recovery shell?

bbarcher wrote:

So the contents of dmesg can't be find in a file i.e. I can't bypass exporting dmesg to a file (dmesg > /mnt/dmesg.txt) on my porked Arch install first?
In other words, I can't extract a boot log of a porked system [1] using only a helthy system [2].
Clearly explained (/var/log/messages vs output of dmesg): http://unix.stackexchange.com/questions … g-messages

You could chroot into your arch installation and issue:

journalctl -b > /mnt/kernel_log.txt

However, if you end up in a rootfs, all other FS'es are mounted ro. So *anything* you do there is temporary. Unless you also chroot into your real arch installation from your rootfs shell. But then again, using dmesg directly might be better.

I'm getting really curious about your issue. Is the topic started yet?


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#21 2014-03-01 21:30:38

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: [SOLVED] How to post information from rootfs recovery shell?

Thanks, Rexilion!

I've started the topic but it's no longer valid
https://bbs.archlinux.org/viewtopic.php … 9#p1387429
Currently struggling with
NetworkManager service - activation of eth0 failed
but I have access to both the proper shell and the desktop environment so not related to the rootfs log hunting smile


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

Board footer

Powered by FluxBB