Rabu, 03 Desember 2014

Bristol Digest, Vol 579, Issue 4

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (Shane McEwan)
2. Re: Two identical disks - system boots to the wrong one
[SOLVED] (Amias Channer)


----------------------------------------------------------------------

Message: 1
Date: Wed, 03 Dec 2014 10:17:29 +0000
From: Shane McEwan <shane@mcewan.id.au>
To: bristol@mailman.lug.org.uk
Subject: Re: [bristol] Compiling Query (was Programming Pi For Use
With DHT 11 Sensor)
Message-ID: <547EE339.10304@mcewan.id.au>
Content-Type: text/plain; charset=utf-8

On 02/12/14 21:30, Peter Hemmings wrote:
> I got up to:
>
> gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
>
> as user in my home directory (did an ls and my dht11.c is there!), but
> it complains no such file/directory.

Is 'gcc' actually installed? What happens if you run gcc with no options?

Raspbian should have it by default but it's worth checking.

If you could send the full output from the moment you run the gcc
command to the point you get the error that would help. It might tell us
which file it thinks is missing.

The code you're trying to compile expects the "wiringPi.h" file to be
located in a system location (probably /usr/include or
/usr/local/include). Perhaps that's the missing file you're talking about?

Did you run the commands at the top of the "Interfacing" section of the
blog post? Those commands install gcc and wiringPi. If they weren't run
or didn't work then that could be causing problems.

Shane.



------------------------------

Message: 2
Date: Wed, 3 Dec 2014 11:01:54 +0000
From: Amias Channer <me@amias.net>
To: andrew@1dtv.com, Bristol and Bath Linux User Group
<bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Two identical disks - system boots to the wrong
one [SOLVED]
Message-ID:
<CAMgU7XUANDTw6GA4-0NwpbcLE=OTpDe_9yH2CzHSw4zByB0XVQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Helllo Andrew,

your ssd might well have a boot sector that chainloads the hdd boot sector
or no boot sector at all . your bios may also be trying to help and finding
the only disk that has a valid boot sector.

Cheers
Amias

On 2 December 2014 at 23:54, Andrew <andrewsoltau@gmail.com> wrote:

> On 18/11/14 23:54, Jamie Lokier wrote:
>
> Hi Andrew,
>
> Hi Jamie. Thank you so much, it is all up and running.
>
> It's because the BIOS setting doesn't hide the drive from Linux, and
> filesystems are searched by their UUIDs. It's generally unhelpful to have
> two filesystems with the same UUID appearing to Linux.
>
> One quick thing you can do is change the filesystem UUIDs using 'tune2fs'
> (for ext2/3/4) or the appropriate filesystem tool.
>
> Then change the GRUB config file in /boot/grub/grub.cfg and /etc/fstab, for
> any mentions of the filesystem UUIDs, to the ones which match the disks
> where those files occur.
>
> And it all worked.
>
> If any entries aren't using UUIDs but are, for example, /dev/sda1 (or the
> GRUB equivalent), that's not really good. You can change them to match the
> disk in your tests, but the effect will be different if a drive really fails
> or is unplugged. UUID is better, so use that.
>
> all on uuid anyway so in luck there.
>
> RAID1 is generally good with two HDDs or two SSDs. It keeps everything
> synchronised and will boot if either drive fails or is removed.
>
> Though if you're unlucky with a drive not failing but "turning weird"
> (usually meaning slow) then it's not a guaranteed solution.
>
> With a HDD and SDD, RAID1 may not have the optimal performance
> characteristics that you want. You may want to explore mdadm
> --write-mostly, --write-behind, and a write-intent bitmap thay may be
> internal, or located only on the SSD.
>
> If you use RAID1 for booting, you will need to install GRUB separately on
> each disk (GRUB writes extra sectors, to just one drive at a time), and make
> sure the GRUB config includes the RAID1 module. It can be tricky to verify
> the installation really worked, so you'll need to try unplugging each drive
> to check it boots from both.
>
> My aim is to stay away from the complexities of raid unless I have to go
> there.
>
> A variation (which I prefer because GRUB won't get stuck if the other disk
> is semi-broken) is to install GRUB with a non-RAID boot configuration, on a
> RAID1 partition, with RAID metadata at the end of the partition so the same
> partition is accepted as a non-RAID read-only filesystem to GRUB.
>
> Lost me there
>
> Best,
> -- Jamie
>
>
> Had a bad moment as it did not work first time. I had to put the ssd on
> sata0 and the hdd on sata 1. Which was obvious, which is why I started out
> like that. Changed it around as part of the tryanything debug method, and
> forgot to change it back. But I remain mystified as to why the system loves
> the hdd so much. It boots it in preference, although removed from the boot
> sequence in the bios, even once the disks have different uuids throughout -
> so I assume it cannot be booting to the ssd, and then the boot starting the
> hdd installation?
> The hdd is sata3 while the ssd is sata2. Could that make a difference?
> Does not really matter now of course. Just interested.
>
> Cheers
>
> Andrew
>
>
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141203/8eb49eb0/attachment-0001.html>

------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 579, Issue 4
***************************************

Tidak ada komentar:

Posting Komentar