Discuss Scratch

Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Ughhh I keep this stupid error when I try to build ncurses (needed by bash and util-linux):
In file included from ../ncurses/curses.priv.h:283:0,
from ../ncurses/lib_gen.c:19:
_24249.c:835:15: error: expected ‘)’ before ‘int’
../include/curses.h:1594:56: note: in definition of macro ‘mouse_trafo’
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
^

CatsUnited wrote:

NerbyParties_ wrote:

CatsUnited wrote:

Jonathan50 wrote:

Bump…
So far I'm making “IDK Linux”. Anybody got a better name?
IDK Linux is a great name tho.
I Agree. IDK Linux Is A Cool Name But You Could Make It Mean Something Different; You Could Make It : Internet Development Kit Linux.
What about the International Dubstep Kernel?
lol
what would it do?
TheMatrixKid
Scratcher
100+ posts

Making [GNU/]Linux Distributions

I'm trying to test my very very minimal Linux image (Busybox + Linux kernel taken from Tiny Core Linux, ~5mb) but I keep getting an error on boot.

The kernel reports “mount: cannot mount /dev/sr0 on /: file/folder does not exist”.

I've checked that /dev/sr0 exists (I set it up with mknod sr0 b 11 0) and tried copying it from my host computer. Neither worked.
What am I doing wrong?
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

TheMatrixKid wrote:

I'm trying to test my very very minimal Linux image (Busybox + Linux kernel taken from Tiny Core Linux, ~5mb) but I keep getting an error on boot.

The kernel reports “mount: cannot mount /dev/sr0 on /: file/folder does not exist”.

I've checked that /dev/sr0 exists (I set it up with mknod sr0 b 11 0) and tried copying it from my host computer. Neither worked.
What am I doing wrong?
does / exist?
btw what is the initrd/initramfs doing?
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

TheMatrixKid wrote:

I'm trying to test my very very minimal Linux image (Busybox + Linux kernel taken from Tiny Core Linux, ~5mb) but I keep getting an error on boot.

The kernel reports “mount: cannot mount /dev/sr0 on /: file/folder does not exist”.

I've checked that /dev/sr0 exists (I set it up with mknod sr0 b 11 0) and tried copying it from my host computer. Neither worked.
What am I doing wrong?
does / exist?
btw what is the initrd/initramfs doing?
waitwaitwait I think I know what the problem is
if / hasn't yet been mounted you can't access /dev/sr0 (since / hasn't been mounted yet)
so in your init script or whatever that's running the mount command, before you run mount you should run mknod:
mknod /dev/sr0 b 11 0
mount /dev/sr0 /
Try that
btw unless you know exactly what hardware it's going to be run on (like some embedded systems or just one device) it's usually better to use something like udev or mdev.
Hope that helps!
TheMatrixKid
Scratcher
100+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

Jonathan50 wrote:

TheMatrixKid wrote:

I'm trying to test my very very minimal Linux image (Busybox + Linux kernel taken from Tiny Core Linux, ~5mb) but I keep getting an error on boot.

The kernel reports “mount: cannot mount /dev/sr0 on /: file/folder does not exist”.

I've checked that /dev/sr0 exists (I set it up with mknod sr0 b 11 0) and tried copying it from my host computer. Neither worked.
What am I doing wrong?
does / exist?
btw what is the initrd/initramfs doing?
waitwaitwait I think I know what the problem is
if / hasn't yet been mounted you can't access /dev/sr0 (since / hasn't been mounted yet)
so in your init script or whatever that's running the mount command, before you run mount you should run mknod:
mknod /dev/sr0 b 11 0
mount /dev/sr0 /
Try that
btw unless you know exactly what hardware it's going to be run on (like some embedded systems or just one device) it's usually better to use something like udev or mdev.
Hope that helps!

I tried that, both with /sbin/mknod and mknod, and it couldn't read the program. It's able to read the inittab, but nothing else. Odd.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Bump.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

TheMatrixKid wrote:

I tried that, both with /sbin/mknod and mknod, and it couldn't read the program. It's able to read the inittab, but nothing else. Odd.
Is mknod on the initrd/initramfs?
TheMatrixKid
Scratcher
100+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

TheMatrixKid wrote:

I tried that, both with /sbin/mknod and mknod, and it couldn't read the program. It's able to read the inittab, but nothing else. Odd.
Is mknod on the initrd/initramfs?

1) Don't have an initramfs/initrd.

2) Rewrote the whole thing, see this for info.

3) All works now, building package manager and preparing libs for X.org and Openbox.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

TheMatrixKid wrote:

1) Don't have an initramfs/initrd.

2) Rewrote the whole thing, see this for info.

3) All works now, building package manager and preparing libs for X.org and Openbox.
Nice! (btw GNUStep isn't exactly a desktop, but oh well )
Does it have a custom package manager?

Last edited by Jonathan50 (Jan. 10, 2016 23:43:27)

Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Linux-libre (Linux with blobs removed) is cool
Direct link to 4.3 xz tarball: http://linux-libre.fsfla.org/pub/linux-libre/releases/4.3-gnu/linux-libre-4.3-gnu.tar.xz

Last edited by Jonathan50 (Jan. 10, 2016 23:45:15)

TheMatrixKid
Scratcher
100+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

Linux-libre (Linux with blobs removed) is cool
Direct link to 4.3 xz tarball: http://linux-libre.fsfla.org/pub/linux-libre/releases/4.3-gnu/linux-libre-4.3-gnu.tar.xz

Compiled that, it's awesome. I'm currently using it in my distro.

Shame they didn't patch over the penguin. The Linuxlibre penguin looks cool.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Bump.
TheMatrixKid
Scratcher
100+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

TheMatrixKid wrote:

1) Don't have an initramfs/initrd.

2) Rewrote the whole thing, see this for info.

3) All works now, building package manager and preparing libs for X.org and Openbox.
Nice! (btw GNUStep isn't exactly a desktop, but oh well )
Does it have a custom package manager?

Yes. So far, it installs packages but is otherwise useless.
novice27b
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

I've been meaning to build LFS for a while now, but I never had the time.

I'm going to have a go at building a minimal system.
novice27b
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

I've compiled the linux kernel, and busybox. I put my rootfs and bzImage on an ext2 partiton. When I try to boot from grub like this:

set root=(hd0,msdos1)
linux /bzImage
initrd /rootfs.cpio.gz
boot

Grub just hangs after I type boot. Does anyone know what I might be doing wrong?

Edit: I made it work by building linux with `make defconfig` instead of `make allnoconfig`

Last edited by novice27b (Jan. 17, 2016 20:37:52)

Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

What is the best init system?
  • System V style init – well there's a clone of it at http://nongnu.org/sysvinit/
  • BSD style init – rather simple init system from BSD
  • Upstart – Canonical's init system, used in Ubuntu and previously in Fedora
  • launchd – iOS and OS X init system
  • systemd – Ugh. Used in Fedora. Does everything
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Bump.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

novice27b wrote:

I've compiled the linux kernel, and busybox. I put my rootfs and bzImage on an ext2 partiton. When I try to boot from grub like this:

set root=(hd0,msdos1)
linux /bzImage
initrd /rootfs.cpio.gz
boot

Grub just hangs after I type boot. Does anyone know what I might be doing wrong?

Edit: I made it work by building linux with `make defconfig` instead of `make allnoconfig`
If you still want a minimal(-ish) kernel, run `make allnoconfig` and then run `make menuconfig` and go to General Setup, then check ‘Initial RAM filesystem and RAM disk (initramfs/initrd) support’ as well as ‘Support initial ramdisks compressed using gzip’.
novice27b
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

Jonathan50 wrote:

novice27b wrote:

I've compiled the linux kernel, and busybox. I put my rootfs and bzImage on an ext2 partiton. When I try to boot from grub like this:

set root=(hd0,msdos1)
linux /bzImage
initrd /rootfs.cpio.gz
boot

Grub just hangs after I type boot. Does anyone know what I might be doing wrong?

Edit: I made it work by building linux with `make defconfig` instead of `make allnoconfig`
If you still want a minimal(-ish) kernel, run `make allnoconfig` and then run `make menuconfig` and go to General Setup, then check ‘Initial RAM filesystem and RAM disk (initramfs/initrd) support’ as well as ‘Support initial ramdisks compressed using gzip’.
That's what I actually tried the first time, but it still didn't work. I don't really mind about it being minimal though.
Jonathan50
Scratcher
1000+ posts

Making [GNU/]Linux Distributions

TheMatrixKid wrote:

Jonathan50 wrote:

Linux-libre (Linux with blobs removed) is cool
Direct link to 4.3 xz tarball: http://linux-libre.fsfla.org/pub/linux-libre/releases/4.3-gnu/linux-libre-4.3-gnu.tar.xz

Compiled that, it's awesome. I'm currently using it in my distro.

Shame they didn't patch over the penguin. The Linuxlibre penguin looks cool.
You can do that manually if you like.
(I'm building a kernel and I see the Parabola GNU/Linux-libre PKGBUILD file for linux-libre actually does that but the boot logo is disabled by default…)

Powered by DjangoBB