SliTaz SliTaz Forum

You are not logged in.

#1 2013-07-03 13:10:40

NScott1969
Member
Registered: 2012-06-23
Posts: 12

slitaz 4 hdd installation, want to change to frugal

Hi,

I have installed Slitaz 4 on HDD (actually its a Compact flash card but using as HDD) from the tazpanel of livecd and added files/programs and setup exactly how I want it.  Now I want to get it all booting in frugal mode, i.e. in RAM.  The application is going on a vehicle that can be shut down at any time by the driver and this is why I want to convert it to frugal.

Currently it loads via grub and I have been trying for days to get it to boot frugal.

What I have done so far is;

1. tazusb writefs none

This created rootfs.gz in the root directory

2. Moved rootfs.gz to boot: mv rootfs.gz /boot/.

3. Edit file /boot/grub/menu.lst

Current HDD boot is as follows (and loads);

title Slitaz GNU/linux (cooking) (kernel vmlinuz-2.6.37-slitaz)

root(hd0,0)

kernel /boot/vmlinuz-2.6.37-slitaz root=/dev/sda1 quiet

Added at the end:

title ram_boot

root(hd0,0)

kernel /boot/bzImage rw root=/dev/null home=/dev/sda1

initrd /boot/rootfs.gz

I tried rebooting and selecting ram_boot in grub menu and then found it was missing bzImage

So I then did

4. copy bzImage from livecd to /boot/

The system does get a lot further now but hangs with messages as follows:

Cannot open root device "NULL" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

A lot of text but sda1 is listed.

If I go back and load item 1 in the grub menu all works fine but HDD not frugal.  Any ideas...?

Thanks,

Nathan

Offline

#2 2013-07-03 14:01:21

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: slitaz 4 hdd installation, want to change to frugal

Hi Nathan,

/boot/bzImage and /boot/vmlinuz-2.6.37-slitaz are equal. It's just a kernel, and you free rename file as you want, or edit line in menu.lst to match actual kernel file name. Two kernel files you see in the ISO are actually the one file and one hard link to this file.

I use frugal installation too, and it works perfectly. I have Acer netbook with Windows XP preinstalled for many years. Then I afraid to break HD into new partitions, and touch existing Windows bootloader. So, I used C:\grldr (from Grub4Dos) as bootloader, and C:\menu.lst, and add one line to C:\boot.ini. Disk C:\ is a hda2; in the C:\boot I have SliTaz kernel and InitRAMDisk (initrd). Now I use separate partition for /home (from the years my /home was C:\ and then ext3 partition in the USB Flash).

Now my menu.lst entry looks like next:

[c]title SliTaz 4.0
rootnoverify (hd0,1)
kernel (hd0,1)/boot/slitaz4/bzImage rw root=/dev/null lang=ru_RU kmap=ru autologin home=UUID=f6df0c5f-bf48-4dde-843c-40098cfa1a8f video=intelfb
initrd (hd0,1)/boot/slitaz4/rootfs.gz[/c]
I use Grub4Dos, but you use Grub. All your menu seems good. But, stop! Try home=sda1 instead of home=/dev/sda1

Offline

#3 2013-07-03 15:19:31

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

Many Thanks for the explanation of bzImage.  I tried hd0,1, falls at the first hurdle, no such file, instantly fails.

Put it back to hd0,0, the boot hangs on root=/dev/null, I think there is something else going on.

It is very strange but it does not like /dev/null.

Offline

#4 2013-07-03 18:47:41

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: slitaz 4 hdd installation, want to change to frugal

@ NScott1969,

Try to add [c]rootdelay=5[/c] at the end of your kernel line in ram_boot entry

Offline

#5 2013-07-03 19:42:52

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

Added rootdelay=5 at end of ram_boot entry.  Same result I sorry to say.

Offline

#6 2013-07-03 21:46:00

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: slitaz 4 hdd installation, want to change to frugal

I didn't take care enough at your first post; for a frugal install I'd use this syntax :

[c]title ram_boot
kernel (hd0,0)/boot/bzImage rw root=/dev/null home=sda1
initrd (hd0,0)/boot/rootfs.gz[/c]

Offline

#7 2013-07-04 09:30:34

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: slitaz 4 hdd installation, want to change to frugal

I also found that the grub syntax was a little tricky; and not very well documented, so if I'd be you I would try to copycat instead of guessing

fwiw (and for the record) here is what ended up working for frugal with slitaz 3 and xp / grub4dos

title SliTaz frugal

  map --heads=0 --sectors-per-track=0 (hd0,0)/boot/slitaz.iso (hd1)

  map --hook

  kernel (hd1)/boot/bzImage rw root=/dev/null vga=normal

  initrd (hd1)/boot/rootfs.gz

Offline

#8 2013-07-04 10:21:50

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

Ceel,

This is what I have currently, no joy.  I'm going to reinstall everything fresh and try again as this should be simple from what you are saying.

Thanks,

Nathan

Offline

#9 2013-07-04 11:21:22

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

christophe,

I really don't understand what you are telling me, sorry.

Nathan

Offline

#10 2013-07-04 11:24:25

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

I have re-installed slitaz with separate home partition sda2.

my ram_boot now has;

root(hd0,0)

kernel /boot/bzImage rw root=/dev/null home=/dev/sda2 rootdelay=5

initrd /boot/rootfs.gz

It boots up to the login and then when I try to login I get "failed to execute login command" splashed up quickly then back to login screen.

I also tried replacing /dev/sda2 with /sda2 same result.

Progress?  I don't know.

Offline

#11 2013-07-04 15:21:59

NScott1969
Member
Registered: 2012-06-23
Posts: 12

Re: slitaz 4 hdd installation, want to change to frugal

Got there, thanks for all your help.

Create 2nd partition in ext4 format (didn't seem to like ext3) for home

After I get it all set up as I like it;

su

tazusb writefs none

mv /rootfs.gz /boot/.

edit /boot/grub/menu.lst

at the end write;

title ram boot

kernel (hd0,0)/boot/vmlinuz-2.6.37-slitaz rw root=/dev/sda1 home=/dev/sda2

initrd (hd0,0)/boot/rootfs.gz

Save it then I can boot from either HDD or in RAM.

If I make updates on HDD version just create a new rootfs.gz and copy into /boot

It runs all my startup scripts, an autologin script etc etc.

Offline

#12 2013-07-04 17:21:32

christophe
Member
Registered: 2011-04-17
Posts: 432

Re: slitaz 4 hdd installation, want to change to frugal

Seems most likely the problem was tied to your home being in / resulting in a too large file for rootfs to be then loaded in ram...

Offline

#13 2013-07-05 23:31:20

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: slitaz 4 hdd installation, want to change to frugal

Nathan,

All works, really? Green bulb, but...

Seems like you really not use frugal mode. You use weird "mixed" mode or "full" installation on hard disk.

Check yourself. Boot your RAM entry. Open terminal. Become root using command [c]su[/c] and root password. Make some changes in your root file system, let's say make new folder /test near existing /tmp, /sys and /sbin using command [c]mkdir /test[/c]

Now reboot your first, "full" mode. Do you have /test folder here?

I know you need root=*** and don't need initrd only in full mode. Here kernel mounts specified partition as root filesystem and continue to boot using init script located on this root partition.

In "frugal" mode you don't need partition for root file system, and you need to write root=/dev/null (i.e. nothing, "black hole"). But in this case you need archive containing root file system (specified in the initrd (=initial RAM disk) line). Kernel loads unpacked content of initrd into RAM and mount it as root file system, and proceed to init script.

But, what if you specify both root file systems (in hard disk and in RAM) as you do? Really, I don't know. Please, check and tell us.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 8 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]