Re: Weird boot issue

2020-01-11 Thread Craig Sanders via luv-main
On Sat, Jan 11, 2020 at 10:02:24PM +1100, Andrew Greig wrote:
> Another thought. Is there a way to command a system upgrade from Ubuntu
> 18.04 to 19.10 , or download the DVD and

Well, yes. Ubuntu is meant to be upgraded in place. As long as you have a CD,
DVD, or internet connection, you can upgrade from one version of ubuntu to the
next.  i.e. from 18.04 to 18.10, then 19.04 and then 19.10

Canonical put a lot of effort into making sure that upgrading to the next
version of Ubuntu works.  They put none at all into making sure that skipping
a release or two will work - they do not recommend or support that at all.

If you're willing and able to deal with and fix a variety of minor issues and
possibly some major ones too, it is possible to upgrade directly from 18.04
to 19.10 but that is a) not the recommended procedure (in fact it is very
strongly NOT recommended), and b) not guaranteed to work smoothly (or at all).
Someone with a LOT of experience with debian or ubuntu should be able to do
itanyone else should follow the recommended upgrade procedure.

> install instead of repair?

I would never recommend that an ubuntu (or debian. or mint. etc) be
re-installed rather than upgraded/repaired UNLESS the system had been
completely trashed or the system had been compromised (in which case, you
can't trust ANY executable or config file on the system).

In either of these cases, make a backup of your DATA if you don't already have
one, install the system from scratch, and then restore your data.

If you also have backups of config files in /etc or wherever, you can use them
as guidelines to recreate new config files (if the system had been compromised)
or just copy them (if it hadn't been compromised).


> I had been thinking of moving up a release anyway. Just that S**t happened
> before I could. Would it pick up the Raid under BTRFS?

as long as the entry in /etc/fstab is good, it should.

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


Re: Weird boot issue

2020-01-11 Thread Craig Sanders via luv-main
On Sat, Jan 11, 2020 at 03:44:21PM +1100, Andrew Greig wrote:
> As it turns out the system does reference the drives by UUIDs.
>
> So, my question is, "by fixing grub 2.8 will my RAID under BTRFS just work?
> Or will I have to run something to get it working as well?"

if you're not booting off the btrfs drives, grub doesn't need to know or
care that they exist. All it needs to know about is where and what the root
filesystem and /boot directory/filesystem are - i.e. what drive and partition
and what kind of fs (e.g. ext2/3/4, xfs, btrfs, etc).

The btrfs filesystem will be mounted AFTER the kernel has booted, mounted the
the rootfs, and started the init process (probably systemd for newer systems,
maybe sysvinit for older systems).  It will use the contents of /etc/fstab to
do that - and that's where it's important to use UUID or LABEL rather than
hard-coding /dev/sdXn device names.

In short as long as the /etc/fstab entry for your btrfs mount is correct, then
it will work.

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


Re: Weird boot issue

2020-01-11 Thread Andrew Greig via luv-main

Hey Craig,

Another thought. Is there a way to command a system upgrade from Ubuntu 
18.04 to 19.10 , or download the DVD and install instead of repair?


I had been thinking of moving up a release anyway. Just that S**t 
happened before I could. Would it pick up the Raid under BTRFS?


Many thanks

Andrew


On 11/1/20 2:12 pm, Craig Sanders via luv-main wrote:

On Fri, Jan 10, 2020 at 05:01:57PM +1100, pushin.linux wrote:

Hi all,I am in a great dilemma, when rebooting after agreeing to a
software update, did not check the packges involved, but running Ubuntu
18.04, I was confronted with this:

GRUB version 2.02
Minimal BASH-like line editing is supported.

For the first word, TAB lists possible command completions. Anywhere else
TAB lists possible device or file completions.

grub> _  ( flashing cursor)
Don't know what to do here.

There's an old (2014) but still pretty good tutorial here:

https://www.linux.com/tutorials/how-rescue-non-booting-grub-2-linux/

see also:

https://help.ubuntu.com/community/Grub2/Troubleshooting


Alternatively, you could boot with a rescue CD or USB stick, and examine the
drives and partitions with fdisk or gdisk or similar in order to identify the
root filesystem (and the /boot filesystem if it's separate from the root fs).

Then mount the root fs as, say, "/mnt", /boot as "/mnt/boot" (if separate),
and optionally other filesystems (you probably won't need other partitions
mounted for the rescue operation).

Then bind-mount the pseudo-filesystems /dev, /proc, and /sys under /mnt.
These are needed for update-grub to work.  Here's a quick way to do that:

 for i in proc dev sys ; do mount -o bind "/$i" "/mnt/$i" ; done

Run "chroot /mnt" to get a shell where /mnt is treated as the root fs.

Then you can edit your /etc/default/grub (if needed - e.g. make sure that the
line "GRUB_DISABLE_LINUX_UUID=true" is commented out), and run "update-grub".

Finally, exit the chroot, unmount the partitions you mounted (in roughly
reverse order to the order you mounted them - e.g. "umount /mnt/dev" before
trying to "umount /mnt"), and reboot.  something like this should work:

 for i in proc dev sys boot / ; do umount "/mnt/$i" ; done

Due to paranoia and ancient & long-obsolete habit, I like to run "sync" to
manually flush all buffers to disk before rebooting. e.g. "sync ; shutdown -r
now".  It's harmless and useless when doing a clean reboot with "shutdown",
but may prevent or reduce fs corruption if you have to do a forced reboot
(e.g. with "reboot -f") or power-cycle.


I am running an ssd as sda, sdb and sdc are in a btrfs RAID array. Puzzled
by this behaviour.

I don't know if this is related to your boot problem or not, but this is the
wrong way to think about drives in linux.

Drives MAY (and often do) retain the same device names (/dev/sda, /dev/sdb,
/dev/sdc etc) when you reboot a machine, but you can NOT rely on that being
the case.

These device names are NOT guaranteed to survive across reboots. In fact, it
is has been documented for many years that these device names are not constant
or reliable.

Storage devices may get different device names for a variety of reasons,
including (but not limited to): drives (including USB drives) being added or
removed, new kernel version, module load order, minor timing differences for
drives spinning up or being detected by the kernel, and more.

This is why you should always configure grub and /etc/fstab to use UUIDs or
LABELs rather than hard-coding /dev/sdXn device names.

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main