Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: partedmagic has changed my bash root prompt

  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default 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:



    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?

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: partedmagic has changed my bash root prompt

    To see what your prompt string is:
    Code:
    echo $PS1
    When you think your hostname is involved, check it:
    Code:
    hostname
    uname -n
    Henk van Velden

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: partedmagic has changed my bash root prompt

    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..




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

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: partedmagic has changed my bash root prompt

    Of course I mean that you do that
    Code:
    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
    Code:
    henk@boven:~> uname -n
    boven
    henk@boven:~>
    And the other one:
    Code:
    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?
    Henk van Velden

  5. #5

    Default Re: partedmagic has changed my bash root prompt

    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.

    Cheers.

  6. #6

    Default Re: partedmagic has changed my bash root prompt

    Quote Originally Posted by ghostintheruins View Post
    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...)
    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.

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,085

    Default Re: partedmagic has changed my bash root prompt

    Quote Originally Posted by ghostintheruins View Post
    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.

    Cheers.
    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.

    Tumbleweed/KDE/Ati Radeon R9 270/AMD FX-6300/8Gb DDR3

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,841
    Blog Entries
    14

    Default Re: partedmagic has changed my bash root prompt

    Quote Originally Posted by wakou View Post
    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
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: partedmagic has changed my bash root prompt

    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


    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 :-)


    --
    Cheers / Saludos,

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

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: partedmagic has changed my bash root prompt

    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.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •