partedmagic has changed my bash root prompt

While doing some post-install (13.1) tuning -up, I had occasion to use the excellent “Partedmagic” bootable USB .iso. This has somehow changed my bash prompt, on my 13.1 install, only when root:

http://wstaw.org/m/2013/12/05/plasma-desktopSi1254.png

Now this does not AFAIKS do any harm on my particular PC, but I can’t find where it has written this, or how to change it back, and tbh I don’t like the fact that it has interfered with my settings! This was a month or so back, and I can’t recall exactly what I might have done when running with partedmagic, but I do not remember editing any system files by hand.
I have looked at the suggestions here:
Linux - change the hostname in the CLI - Stack Overflow

(My user prompt was set by me, in bashrc before I upgraded to 13.1)

Should I contact the maintainer of partedmagic?

To see what your prompt string is:

echo $PS1

When you think your hostname is involved, check it:

hostname
uname -n

Thanks Henk, My PS1 prompt is unaffected. It is only my root prompt which does this.
uname -n returns partedmagic
hostname returns

partedmagic

hostnamectl returns this…

http://wstaw.org/m/2013/12/05/plasma-desktopLy1254.png

I have tried using hostnamectl set-hostname --transient SPROOT
Which works, but reverts to partedmagic on reboot…

Of course I mean that you do that

echo $PS1

when being loged in as the user were you have the problem (root inyour case). Not when being a user without a problem.

And please do not tell stories like “uname -n returns partedmagic”, but post the computer facts. Copy/paste from the terminal between CODE tags (you get them by clicking on the # button in the tool bar of the post editor). You are already a long time member here, thus you should know >:(

Then you get something like

henk@boven:~> uname -n
boven
henk@boven:~>

And the other one:

boven:~ # echo $PS1
\\]\h:\w # \\]
boven:~ #

But these are only illustrations of course.

It indeed seems that your hostname has changed. Dangerous program you have used there!

Did you try to reconfigure your hostname with YaST > Network Devices >> Network Settings and thenthe Hostname/DNS tab?

my 2(euro)cents scenario:

(this is based on the fact rhat you have **partedmagic **as transient hostname, i.e. in a specific network)

  1. user does upgrade his OS to 13.1 and maybe the network settings are changed, i.e. for dhcp to receive it from the dhcp server and not set by the user;

  2. user uses parted magic which actually is set to use the hostname ‘partedmagic’ and send it to the dhcp server and a new lease is written for the user’s MAC address

  3. user restarts the pc/workstation and the dhcp server sends the new lease name and hence it gets the ‘partedmagic’ hostname (if only the hostname was changed from the bash prompt…)

I do not know which version of pmagic you used (I did not since it became payware) but I never had such a problem as you describe so the question is: what did you “tweak” with pmagic? Did you chroot? Did you by mistake use the “save settings” (IIRC it has something like that), did you by mistake copied your .bashrc from pmagic shell to your actual root shell? and maybe /etc/host

pmagic lets you do a LOT of things and that is why the user should be always twice as careful when using it. :slight_smile:

Cheers.

That’s the most likely scenario IMHO as well.
And AFAIK the default is to get the hostname from the DHCP server.

So enter YaST->Network Devices->Network Settings->Hostname/DNS and uncheck “Change Hostname via DHCP”. That “partedmagic” transient name should disappear then.

Or enter your router’s configuration, you should be able to change the hostname that your PC gets assigned by the router there.

Thanks guys, I have checked the switch in YAST and sure enough, all is back as it should be. I confess that I don’t really understand what had happened here, despite the explanation above. Should I enter my router config and see if any reference is to partedmagic there?

It is a shame that pmagic is now payware, although I believe it can be got for free somewhere (!), I have an .iso on HDD from before.
I did not copy .bashrc, nor /etc/host, nor ask it to save any settings… AFAICR! I was messing with GRUB2 and various other pre-boot tools, but I honestly do not remember exactly what I was doing then, I had backed up preparatory to installing 13.1, and was playing with stuff in a ‘nothing to lose’ way…

Sorry, Henk for putting the one-word results of one-word commands in plain text, I know that it annoys you.

Henk doesn’t persist on posting output between CODE tags because it annoys him. It’s because it’s sight-protective. Try this:

  • Copy /var/log/messages to your homedir
  • Open the file with Libreoffice, format to Times Roman, justification on
  • Read the entire file without interruption
  • Look out of your window
  • Look for paracetamol
    Doesn’t work the first day? Then repeat next day.

There’s a reason programmers use mono-spaced editors, really.

The effect for you is, that when I’m tired I skip posts as soon as I see things like the output in your posts above. I know this works the same for Henk, and may work the same for others. Where I also think this was never your intention :slight_smile:

On 2013-12-06 13:06, Knurpht wrote:

> The effect for you is, that when I’m tired I skip posts as soon as I see
> things like the output in your posts above. I know this works the same
> for Henk, and may work the same for others. Where I also think this was
> never your intention :slight_smile:

True, same here.

More, to see those photos I have to do extra things (they don’t display
via nntp). I also prefer to see the whole command sequence in text here,
inside a nice code tags section, it is much faster to read.

But anyway, does not matter, the issue was solved :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I have two headdresses here: as a member and as a mod.

As a member I try to help in threads were i think it is in one of my areas of knowledge. When people for some reason do not provide the asked information in a form where I can be sure it is the real and complete information, I will quit such a thread after a few tries.

As a mod I try to further the usefullness of these forums for it’s members. Part of this is trying to persuade members to post in a way that help can come foreward efficiently. Spreading the message of the usefulness of things like: show the command used, the output, the prompts, use CODE tags to make it readable (a feature not be be found easy on the forums, thus it must be advertised to every new memeber anew). I do this also in threads outside my area of knowlegde. I advertise the posting of usefull information like openSUSE version, desktop used and other things that obviouly should have been posted in the first post of a thread, but are missing. This all to avoid that the real helpers skip such a thread when they think they will be faced with an endless posting session to even get a problem defined.

An example. Asked for an fdisk -l output, a member presented some llisting. The number of partitions there did not match with the number of partitions needed reading the problem description of the member. After several posts it emerged that:
a) this wasn’t indeed the full fdisk -l listing, one disk was missing and because it wasn’t the full copy/paste with all that should be there, this was not easy to see;
b) it wasn’t even made on the openSUSE system he reported the problem on, but from a multi-boot Ubuntu system on that hardware.
Now go imagine. In such circumstances there will be people that leave such a thread alone to go for a thread wiith a better cooperating member.

Being a member and a mod, often my reactions to a thread are mixed. Yes, there are times that am annoyed as a member and disappointed as a mod.

On Fri 06 Dec 2013 11:36:02 AM CST, wakou wrote:

It is a shame that pmagic is now payware, although I believe it can be
got for free somewhere (!), I have an .iso on HDD from before.

Hi
Just get on to SUSE Studio and create your own live cd with all the
tools you need?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

On 2013-12-06 15:27, malcolmlewis wrote:
>

> On Fri 06 Dec 2013 11:36:02 AM CST, wakou wrote:
>
> It is a shame that pmagic is now payware, although I believe it can be
> got for free somewhere (!), I have an .iso on HDD from before.
>
>

> Hi
> Just get on to SUSE Studio and create your own live cd with all the
> tools you need?

There is already an official XFCE rescue image on the main opensuse
download page. Parted is included. AFAIK.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)