[Novalug] root password buggered

Bryan J Smith b.j.smith@ieee.org
Tue May 26 15:33:36 EDT 2015


On Tue, May 26, 2015 at 3:10 PM,  <covici@ccs.covici.com> wrote:
> My install is several years old and no raid in use at the moment.  But I
> do have lvm and as long as I enable the group in the command line and I
> even enable the lv's separately, it seems to work fine.

And I've completely 'brought up' a system where the initramfs was
damaged and unusable.

However, it's 100x easier -- and removes the need to remember
everything -- if you use the recovery tools of the distro, than trying
to "shotgun" it.

For example, real world enterprise ...
- Load any HBA or other storage drivers
- Bring up the needed DM modules, including MPIO, LVM, etc...,
especially if /etc/* is not readable (chicken-egg issue), and you have
to manually "figure out" their configurations
- Bring up the necessary, psuedo file systems, etc...
And beyond that, even if you get the file systems mounted, for chroot,
you have to ...
- Bind mount various filesystems to whatever you're going to chroot

It's just easier to use the Live image tools that Fedora/RHEL,
SuSE/SLES, etc... give you, which do most (if not _all_) of this for
you, correctly, repeatedly, deterministically, without human oversight
or errors.

In other words ... *know* the distro's tools that save you pain, and
sometimes, your data.

-- bjs

P.S.  Furthermore, and this is the reason I stopped dual-booting
Ubuntu LTS, have you ever had LVM adopt of Intel Software RAID?
Ubuntu has not "caught up" and adopted mdadm, so you have to do it
manually.  If you have LVM adopt, it's only worse.

In just the Live Image/Installer, it took me forever to learn how to
back out LVM, then remove DM (dmraid), blacklisting it, then install
mdadm, bring up the MD, then add LVM ... then install.  And even then,
post-install, Ubuntu's Dracut is still missing a lot of the MD logic
to get it to work, and despite my hacking to try to modify the scripts
in the initramfs (which I was going to contribute as a patchset), I
still couldn't get it to work.  So I gave up.

I'm hopeful this will occur in the future any way, now that
Debian-Ubuntu is adopting systemd, and many othert things.

have you ever taken an Intel RAID setup and tried o


>
> William Sutton <william@trilug.org> wrote:
>
>> It's been about a year since I tried a fresh stage 3 install with lvm
>> and raid and a separate /usr.  either there's something about the
>> lvm+raid config that breaks this (doubtful, but possible), or your
>> install predates their disallowal of a separate /usr, or they've had
>> enough people gripe about it that they reverted it.
>>
>> William Sutton
>>
>> On Tue, 26 May 2015, covici@ccs.covici.com wrote:
>>
>> > Not true, I am using gentoo and my /usr is on a separate file system.
>> > It works great and even does an fsck before hand.
>> >
>> > William Sutton via Novalug <novalug@firemountain.net> wrote:
>> >
>> >> footnote:  not all distro dracut builds are created equal.  AFAICT
>> >> from my last attempt at a gentoo install, they've actually modified
>> >> the dracut they provided to prevent you from doing things they don't
>> >> think you should do... like putting /usr on a separate filesystem from
>> >> /.
>> >>
>> >> William Sutton
>> >>
>> >> On Tue, 26 May 2015, Bryan J Smith via Novalug wrote:
>> >>
>> >>> Heck, someone even created a YouTube video of this using CentOS 7.
>> >>> - https://www.youtube.com/watch?v=5KtVtrbTgTk
>> >>>
>> >>> The ability to leverage Dracut's rd.break (root disk breakpoints)
>> >>> should not be overlooked.  It's the safest, most deterministic way, to
>> >>> boot a system, as deployed, instead of an arbitrary image.
>> >>>
>> >>> I.e., as long as the bootloader can load the Dracut image (initramfs
>> >>> aka initrd), it's going to give you an environment as close to your
>> >>> system as possible, and far better than anything external (like a Live
>> >>> image).
>> >>>
>> >>> If you're system uses Dracut, please learn it for your own benefit.  ;)
>> >>>
>> >>> -- bjs
>> >>>
>> >>> On Tue, May 26, 2015 at 12:28 PM, Bryan J Smith <b.j.smith@ieee.org> wrote:
>> >>>> On Tue, May 26, 2015 at 9:41 AM, Beartooth via Novalug
>> >>>> <novalug@firemountain.net> wrote:
>> >>>>> On Tue, 26 May 2015, greg pryzby via Novalug wrote:
>> >>>>> [....]
>> >>>>>>
>> >>>>>> I am asking before searching because I have learned, if I ask I will find
>> >>>>>> the answer quicker :P
>> >>>>>
>> >>>>>         That's my license to ask: how do I fix my root password on a laptop
>> >>>>> running Fedora 21?
>> >>>>>
>> >>>>>         I've tried typing it elsewhere and using c&p; no joy; it really is
>> >>>>> messed up, holy Klono's cyber-sidekick knows how, when, etc.
>> >>>>>
>> >>>>>         I've tried rebooting and choosing rescue mode instead of a normal
>> >>>>> kernel; but I just get a normal kernel and normal login splash anyhow.
>> >>>>>
>> >>>>>         But I've forgotten the classic method to boot to single user ....
>> >>>>
>> >>>> You must interrupt normal boot inside of Dracut (initramfs aka initrd).
>> >>>>
>> >>>> Use one of the "rd.break" command-line options.
>> >>>>   rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup]
>> >>>>
>> >>>> If you not familiar with Dracut, or the purpose of the initramfs, it
>> >>>> is the small root image that loads to support the system boot, kernel
>> >>>> modules, storage organization, etc... so the actual, run-time storage
>> >>>> can be loaded.  The latter is then "switched to" ("pivot root") at the
>> >>>> end of Dracut.
>> >>>>
>> >>>> The rd.break image is a _powerful_ solution that loads a lot of the
>> >>>> required support to boot, and will _prevent_ you from screwing up any
>> >>>> complex storage organization, unlike a Live image (let alone one from
>> >>>> another distro).  This solution is not limited to Fedora, although
>> >>>> many distros have not implemented most of Dracut's advanced
>> >>>> capabilities like Fedora-based or SuSE-based distros.
>> >>>>
>> >>>> -- bjs
>> >>>>
>> >>>> P.S.  Please do _not_ use "init=/bin/boot".  That has always been a
>> >>>> _dangerous_ solution due to not loading the required storage
>> >>>> organization that some systems require, and can result in data loss or
>> >>>> a screwed up boot (especially if you try to change boot portions).
>> >>>> The new Dracut rd.break solution that several distros now implement is
>> >>>> much, much safer, as it provides an environment for the system as
>> >>>> deployed.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> --
>> >>> Bryan J Smith - http://www.linkedin.com/in/bjsmith
>> >>> **********************************************************************
>> >>> The Novalug mailing list is hosted by firemountain.net.
>> >>>
>> >>> To unsubscribe or change delivery options:
>> >>> http://www.firemountain.net/mailman/listinfo/novalug
>> >>>
>> >> **********************************************************************
>> >> The Novalug mailing list is hosted by firemountain.net.
>> >>
>> >> To unsubscribe or change delivery options:
>> >> http://www.firemountain.net/mailman/listinfo/novalug
>> >
>> > --
>> > Your life is like a penny.  You're going to lose it.  The question is:
>> > How do
>> > you spend it?
>> >
>> >         John Covici
>> >         covici@ccs.covici.com
>> >
>
> --
> Your life is like a penny.  You're going to lose it.  The question is:
> How do
> you spend it?
>
>          John Covici
>          covici@ccs.covici.com



-- 
-- 
Bryan J Smith - http://www.linkedin.com/in/bjsmith



More information about the Novalug mailing list