Linux mint from scratch

Знакомьтесь — Linux From Scratch

Вместо вступления

«Хочешь начать изучать GNU/Linux? Начни с Linux From Scratch.»

Единственный бумажный дистрибутив

LFS (здесь и далее аббревиатура от Linux From Scratch) – книга, написанная Герардом Бикмансом, описывающая процесс сборки минимального рабочего варианта GNU/Linux из исходных кодов. Почему бумажный? В свое время книгу можно было купить в твердом переплете, что делает «дистрибутив» несколько необычным, не правда-ли? Помимо самой книги, для сборки конечно-же понадобится интернет (или заранее загруженные исходные коды), свободный раздел на жестком диске, и любая операционная система на базе ядра Linux, имеющая компилятор. Лично я всегда использую либо уже собранный дистрибутив LFS, либо полную установку Slackware – в нем есть все необходимое, чего не скажешь про (например) Ubuntu. Конечно, всегда можно загрузить нехватающие пакеты, но ведь мы хотим только-только научиться линуксу? А Slackware даже в своей базовой установке и без конфигурирования предоставляет требуемый инструментарий.

Следует сказать сразу — дистрибутив собранный по книге LFS не умеет толком ничего. Вернее, ничего такого, что потребуется неискушенному пользователю. Он умеет включаться, выключаться, перезагружаться, использовать Ethernet подключение, но что самое главное — компилировать. Так существуют другие книги, теперь уже поддерживаемые сообществом — Beyond LFS позволяет собрать те самые, интересные пользователю, программы. От браузера и графической среды, до систем управления базами данных и DHCP сервера. Книга имеет свойство отставать в версии от базовой книги, но полученный от LFS опыт обычно достаточен, для самостоятельного разрешения конфликтов версий. Три другие книги — Automated LFS, Cross LFS и Hardened LFS полностью соответствуют названиям и выходят за пределы этой статьи. Впрочем, всегда можно почитать в интернете, правда?

Но почему начинать с него?

Все очень просто, если не сказать — до смешного. Помимо инструкций, в книге много теоретического (но крайне сжатого и как следствие — не заунывного) материала. Установите Ubuntu. Вы знаете что делает пакет Libtool? Или Gawk? После пары успешных сборок LFS, вы будете знать каждый пакет в своей системе и что самое главное — представлять, как они взаимодействуют. Да, состав системы минимальный, но это постоянно подогревает интерес к ее усовершенствованию. Приучит частенько обращаться за помощью к Google и читать англоязычную документацию. Поначалу вы не будете понимать и половины своих действий, внимательно перепечатывая или копируя блоки кода в консоль. Но в самом конце, осознание того, что эту неказистую, без поддержки графики и вашей мощной видеокарты, без новомодного Aero и сенсорных экранов, операционную систему вы собрали сами, придаст вам такой запас сил и гордость, что вы сами потянитесь за новыми знаниями и новыми победами. Я немного утрирую, но ощущения после первой перезагрузки в новую систему сложно забыть даже сейчас.

Цифры и суровая правда жизни

LFS вовсе не минимальный по своему весу дистрибутив. Для сборки потребуется порядка 3 свободный гигабайтов на диске (это помимо уже рабочей Linux-Based системы) — тем не менее, после определенных танцев, систему можно будет превратить в Live-CD. Если у меня будет такая возможность, я расскажу как это делается, в последствии. Компиляция всего и вся (с учетом необходимости создания конфигурационных файлов и прочего) занимает около двух дней. Это если с перерывами на сон, питание и отключение компьютера на ночь. С другой стороны, это зависит от производительности компьютера, на котором собирается система. Моей первой жертвой был ноутбук MSI X-340 — процессор Intel Core 2 Solo с тактовой частотой 1.2 гигагерца (вообще говоря, LFS рекомендуется собирать на одноядерной системе). Оперативная память — 2GB DDR2. Вполне достаточно даже более низких характеристик, а на быстром процессоре сборка пойдет значительно быстрее.

Читайте также:  User administrator in linux

Кстати, приблизительное время сборки каждого из пакетов указано в учебнике. За единицу времени, принимается время сборки пакета Binutils — ассемблера, линкера и ряда других, более мелких утилит для работы с объектными файлами. На вышеуказанной системе это заняло три минуты.

Состав дистрибутива

Перечислять все входящие в LFS пакеты не имеет большого смысла. Список получится длинным, и практически ни о чем не говорящим новичку; избыточным для человека разбирающегося. В этом небольшом разделе я лишь хотел дать несколько общих советов. Во-первых, собирая пакет, не описанный в книге, загляните в репозиторий патчей — возможно его уже адаптировали для использования в LFS. Во-вторых, BLFS почти полностью состоит из опциональных пакетов — просто выбирайте те, которые вам нужны и смело добавляйте в свою сборку LFS. И третье: с самого начала используйте пакетный менеджер. В книге этому уделяется глава, но практические инструкции отсутствуют чуть менее, чем полностью. Я лишь могу порекомендовать Guarded Installation Tool – написанный на Bash’е скрипт, обеспечивающий минимальный набор команд, для управления пакетами, зависимостями и версиями. В LFS этого будет достаточно. В последствии вы можете скомпилировать из исходных кодов APT или DPKG — это неплохо освещено на форумах сообщества.

Вместо заключения

За прошедшие полтора года я сильно продвинулся в своем изучении. Продвинулся со стадии «Есть такая операционная система» до уровня «Подниму сервер под Gentoo за трое суток». Я еще очень далек от идеала и вряд ли могу даже называть себя настоящий линуксоидом — на домашнем компьютере уживаются старенькая Windows XP и Xubuntu 10.10, но знаете что я отвечаю, когда меня спрашивают с чего начать изучать линукс? Начните с Linux From Scratch.

Источник

Linux Mint Forums

Welcome to the Linux Mint forums!

[SOLVED] Installing from scratch

[SOLVED] Installing from scratch

Post by JerryF » Mon Mar 20, 2017 1:01 pm

When Mint 18.2 comes out, I intend to do a fresh install. Currently, I have dual boot of Windows 10 and Mint 18.1 Cinnamon.

What I want to do is:

  1. Backup both Windows and Mint
  2. Set my laptop back to UEFI
  3. Convert my hard disk from MBR to GPT
  4. Install Windows 10 (let it create the partitions it needs)
  5. Partition hard disk for Mint (/, /home, and swap)
  6. Install Mint 18.2

Because I’ll be going from 18.1 to 18.2, is it possible to restore the /home partition without any issue?

Re: Installing from scratch

Post by Pjotr » Mon Mar 20, 2017 1:05 pm

JerryF wrote: When Mint 18.2 comes out, I intend to do a fresh install. Currently, I have dual boot of Windows 10 and Mint 18.1 Cinnamon.

What I want to do is:

  1. Backup both Windows and Mint
  2. Set my laptop back to UEFI
  3. Convert my hard disk from MBR to GPT
  4. Install Windows 10 (let it create the partitions it needs)
  5. Partition hard disk for Mint (/, /home, and swap)
  6. Install Mint 18.2

Because I’ll be going from 18.1 to 18.2, is it possible to restore the /home partition without any issue?

Re: Installing from scratch

Post by JerryF » Mon Mar 20, 2017 1:38 pm

One main reason is that I want to have GPT instead of MBR. Second reason is that I’m finding Mint slower for starting and quitting.

I’ve done the in-place upgrades within Mint before, but want to start fresh. It’ll also be a re-learning experience for me with Mint.

I know it sounds crazy and a lot of work, but this isn’t the first time I’ve had to do a reinstall, especially of the dreaded Windows versions.

Источник

What is Linux From Scratch?

Linux From Scratch (LFS) is a project that provides you with step-by-step instructions for building your own customized Linux system entirely from source.

Читайте также:  Как настроить bios для запуска windows

Why would I want an LFS system?

Many wonder why they should go through the hassle of building a Linux system from scratch when they could just download an existing Linux distribution. However, there are several benefits of building LFS. Consider the following:

LFS teaches people how a Linux system works internally
Building LFS teaches you about all that makes Linux tick, how things work together and depend on each other. And most importantly, how to customize it to your own tastes and needs.

Building LFS produces a very compact Linux system
When you install a regular distribution, you often end up installing a lot of programs that you would probably never use. They’re just sitting there taking up (precious) disk space. It’s not hard to get an LFS system installed under 100 MB. Does that still sound like a lot? A few of us have been working on creating a very small embedded LFS system. We installed a system that was just enough to run the Apache web server; total disk space usage was approximately 8 MB. With further stripping, that can be brought down to 5 MB or less. Try that with a regular distribution.

LFS is extremely flexible
Building LFS could be compared to a finished house. LFS will give you the skeleton of a house, but it’s up to you to install plumbing, electrical outlets, kitchen, bath, wallpaper, etc. You have the ability to turn it into whatever type of system you need it to be, customized completely for you.

LFS offers you added security
You will compile the entire system from source, thus allowing you to audit everything, if you wish to do so, and apply all the security patches you want or need to apply. You don’t have to wait for someone else to provide a new binary package that (hopefully) fixes a security hole. Often, you never truly know whether a security hole is fixed or not unless you do it yourself.

What can I do with my LFS system?

A by-the-book LFS system is fairly minimal, but is designed to provide a strong base on which you can add any packages you want. See the BLFS project for a selection of commonly used packages.

Who’s who:

  • Project Creator: Gerard Beekmans
  • Managing Editor: Bruce Dubbs
  • Editor: Ken Moffat
  • Editor: Pierre Labastie
  • Editor: DJ Lucas
  • Editor: Douglas R. Reno
  • Editor: Thomas Trepl
  • Editor: Tim Tassonis
  • Editor: Xi Ruoyao
  • Plus numerous people who contribute to the book and its side projects.

© 1998-2021 Gerard Beekmans. Website design by Jeremy Huntwork & Matthew Burgess.

Источник

Acme Dot Company

Installing the Scratch 2.0 Editor on Linux Mint 17

I want to be able to have kids to Scratch programming without an Internet connection on an open source desktop distro, in spite of Adobe AIR no longer being actively supported on Linux.

This turns out to be not too challenging. First, get the AIR installer:

Make it executable.

The AIR installer will complain that it can’t find the GNOME Keychain libraries where it expects to, so let’s set up symlinks for those (this is for a 64-bit system):

Now, we can run the AIR installer.

Next, browse to http://scratch.mit.edu/scratch2download and grab the Linux version of Scratch.air. If your browser doesn’t offer to open it with the Adobe Air Installer application when it’s been downloaded, find the file, right-click on it, choose “Open with…”, browse to /usr/bin and select the Air Installer.

You should have a working version of the Scratch 2 Offline editor when the install has completed.

27 thoughts on “Installing the Scratch 2.0 Editor on Linux Mint 17”

I’m trying to set up a Scratch environment on my Linux Mint machine so I can learn it myself, then get my various grandchildren going. I was very interested to see your post on http://www.acme-dot.com/installing-the-scratch-2-0-editor-on-linux-mint-17/ but unfortunatley it does not work for me.

Читайте также:  Xerox m20i драйвер windows 10

I set up the symlinks, but when I tried to execute the Air installer, I got error “/tmp/air.W9oRST/setup: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory”

I’m running Linux Mint 13 Maya, kernel is Linux 3.4.0-5-generic (x86_64)

If you could help me I would be grateful

Well, that’s a pretty old version of Mint.

You’re going to need to find the Gnome Keychain libraries. Try something like

sudo find / -name keyring.so.0

and see if you can locate it. Do the same for libgnome-keyring.so.0.2.0. Then set up the symlinks as directed, but pointing at the actual locations of these files.

If you can’t find them, then the only answer I have for you is to upgrade your Mint install (which you should probably do anyway…)

OH, WAIT. It’s looking for a GTK library…? I think you’re going to need to upgrade to something newer than Mint 13 for this to work.

Thanks, I guess I will have to upgrade and try again.

Let me know how it works out for you.

Hey there. Have you figured out how to make simple a site smartphone pleasant?
I’m trying to find a theme or wordpress plugin that could possibly resolve this issue. If you have any suggestions, please share.
Easy inquiry that’s thoroughly off of theme.
My web site seems peculiar when surfing.

Any WordPress theme that describes itself as being “responsive” should handle a variety of screen sizes correctly. A search on WordPress.org for “responsive” turns up close to 800 possibilities.

Just wanted to say thanks for this post. Couldn’t get Scratch 2 to load but setting up the symlinks using your instructions fixed it. Thanks for sharing!

Glad that was helpful to you.

Hi – I’m trying to get this going on a 32-bit system (it’s an old donated laptop I’m trying to re-purpose for teaching kids to code). I’ve copied your terminal commands, substituting i386-linux-gnu for x86_64-linux-gnu. But Terminal says ‘Permission denied’! When I list the directory I can see libgnome-keyring.so-0 but when I look at it in the GUI it’s listed as a ‘Link to Unknown’. Should I try to re-install GNOME KEYRING?

Fixed it, I was just missing a bit of the command line. Too many hours looking at tiny screws today, I think! BUT still worth mentioning the i386-linux-gnu directory for 32-bit installations. Everything else works exactly as you describe, so THANK YOU! This is a huge help!

Worked Great, Thanks!

Thanks for the tip. I hate that the authors of Scratch have made it so difficult and – closed – to install Scratch. It really ruins the point of the application.

I hope someone forks Scratch 1.4 and keeps it open and easy!

I followed the instructions exactly without problem and it seemed to install with no problems and it appears in the applications folder in the accesories folder. During the installation process I checked the box for the program to start at the completion of the installation.

I did this installation in linux mint17.2 kde.

My problem: When it starts I get a window that is mostly blank. There’s a bar at the top with the usual options on the right: shrink, maximize/minimize and close. On the left there’s an arrow for a drop down menu with things like mimimize, maximize, move, resize, always on top (and other display options) and close. But there’s nothing present for actually using the program.

I closed the program an reopened it from the applications menu and it’s the same.

I even tried rebooting and then opening it and it still gave the same result.

What should I do?

I’m not sure I could tell you without being able to poke at your PC. Maybe Java’s not properly installed?

How can I make sure java is properly installed?

Источник

Оцените статью