This is my first post here. First thing first, I'd like to THANK whoever is involved with SliTaz Project. It's such an amazing OS indeed.
I'll just explain a bit about what I need.
I'm currently trying to create my own remix/remaster/flavor of an OS and I'm thinking to do that with Ubuntu and SliTaz but quite honestly, I'm so much interested in SliTaz.
So far, what I really care about is GRUB2, how to install it? how to replace GRUB Legacy so that GRUB2 will be in charge? I love GRUB2 and find it much easier to deal with than GRUB Legacy.
If I managed to install GRUB2 and replace GRUB Legacy then I could carry one and create my own iso file based on SliTaz.
Thanks for your reply. I already checked that post before I start this one but apparently the OP did not manage to get GRUB2 and the link is for Ubuntu, not sure if that would work with SliTaz as there is some differences in CLI commands. However, I'll try to follow the steps in this link and see.
I have been trying for a while to have slitaz+grub2 work and gave up. I think it just does not work (has any one made it work ??), and quite frankly i have read a number of complaints about it.
For me i solved the issue by using grub4dos that is called from boot.ini (which is booted from grub2) I did that because i have a number of coexisting system (XP, Mint, slitaz, and some other that i have been testing)
If what you want to do is to carry an os around with you, slitaz will be a much better idea (it will be faster and can run from memory)
Well, I just don't know why they don't use GRUB2? it has much more features than GRUB Legacy.
I once asked the same question in OpenSUSE's forum and one of the forums admin told me that to forget it as GRUB2 will not work with OpenSUSE. I just don't get it.
What I'm trying to achieve is: I want to create my own remix/flavor of SliTaz. I'm still reading the online documents to learn how to do it. I made it through "writeiso" (hope that's the correct name) but I want to add more beside packages (I installed some of the packages I need) like GRUB2, a different name rather than SliTaz and some other stuff (for example LXDE instead of Openbox).
One of Ubuntu-Forum's admin told me to do this:
From Ubuntu LiveCD, I try to install GRUB2 so that SliTaz will have GRUB2. I tired it once but it did not work and honestly I did not try it again. I might give it a try.
I guess the point is to install GRUB2 regardless what LiveCD you will use for that. My case was different so he told me that as per my case. Now, I'm on different PC, different case and scenario.
I know for sure GRUB2 is one of the packages in SliTaz Package List and I already downloaded it and installed it. However, looks like it's not going to work or there must be something I have to do first.
I prefer to deal with GRUB2 rather than GRUB Legacy. Beside, with one command "sudo grub-update" I could find all the other OS's which are installed in my system in case of Multi-Booting.
The correct command is "sudo update-grub" The update-grub script is a debian/ubuntu script and not part of grub legacy and grub2 source code. Look at the file list of grub.tazpkg and grub2.tazpkg at http://pkgs.slitaz.org you will notice there is no /usr/sbin/update-grub Do a file search of the entire slitaz repository of stable or cooking, there is no update-grub script in any tazpkg
My bad, I was so tired and sleepy last night when I typed that.
Yes, it is:
sudo update-grub
Okay, what does that mean? if update-grub will not work then does it mean that feature of updating grub is not there on SliTaz Repository? are you trying to say that there is no point to install and use GRUB2 with SliTaz?
it means you will be able to use this command only with ubuntu, not with slitaz, as this is part of ubuntu, not part or grub2.
Slitaz should work with grub2, but does not (at least not for version 3), and i do not see the point in solving the issue since grub does the job.
Futhermore, the main difference between slitaz and ubuntu does not rely in the presence of the update-grub command.... I cannot see why anyone would want to make that a deal maker or breaker.... There ARE significant differences between the 2 OS....
I don't about making it install from within slitaz, but I use burg (which is based on grub2) and boot slitaz fine... it even autodetected slitaz with update-burg, which from my understanding it was not supposed to do. But burg offers many features of grub2; maybe it would be easier to make work with slitaz?
If anybody wants, I also have custom icons I made for slitaz in the burg themes...
I successful did work Grub2 with Slitaz 3.0 stable after a CD install
I have used Ubuntu 10.10 to install Grub2: sudo grub-install --recheck --root-directory="/media/$LABEL" "`ls -l /dev/disk/by-label|sed -n 's#.*'"$LABEL"'.*/\([a-zA-Z]\+\)[0-9]\+#/dev/\1#p'`"
and make config file: sudo grub-mkconfig -o "/media/$LABEL/boot/grub/grub.cfg"
then add the famous rootdelay: sudo sed '/slitaz root=.*rootdelay=/n;/slitaz root=/s/.*/& rootdelay=10/' -i "/media/$LABEL/boot/grub/grub.cfg"
but despite all my attempts to use root=UUID nothing to do. therefore require to have multiple menuentry to cover a maximum of /dev/sd[az]1 and be more adaptable to a variable number of disks.
I followed this method (the first one) to install GRUB2 from Ubuntu 10.04 LiveCD (by the way, it doesn't matter which LiveCD you use as long as there's GRUB2):
Hi, here how Grub2 does work at home w/ Slitaz 3.0 Stable. Not sure this is the way you would like to take TheForsaken, but I write it here anyway
1 ) I install Ubuntu (actually 10.10 but I did it previously w/ 10.4 too) in first primary partition 2 ) at the end of Ubuntu's installation, I choose to install Grub2 in Ubuntu partition1 (not at the root of the whole disk ; prolly not important, but I write every step like it is) 3 ) I install Slitaz further away on the same disk, in a logical partition within an extended partition 4 ) I tweak Grub2 to remove Slitaz from autodetect2 (in fact I unable the whole autodetect process) and write a hand-made entry for both Slitaz and Windows Vista which are located in very first places before Ubuntu and its multiple kernels
(1) I would probably not doing it like this now, but when I began to use both Windows and Ubuntu on two separated harddisks, that was how it was intended to be done. Now you can easily choose to install Grub2 in the boot sector of the disk if Windows is installed on another disk. But as it is the very same installation from Ubuntu 8.04 without formating a single time, it stayed like this.
(2) I can remember that at first proposals for Grub2 from Ubuntu installation (maybe 9.10 ? 10.04 certainly), Slitaz was *not* recognized by autodetect process. I don't know now. I can explain how I tweaked my Grub2 if you success to install it, it did not take me long.
ernia, thank you for your post but I'm afraid it did not help much. However, I'll start reading it too again for the 4th time perhaps I could find something I missed.
babaorum, thank you for your post. This is NOT how I want to do it :) I had Multi-Booting System before with 9 OS's installed and everything was just prefct. That's another story.
What I'm trying to achieve is this:
a) Install SliTaz
b) Try to remove GRUB Legacy and install GRUB2 and try to configure it somewho so it will be the main Boot Loader.
c) I'm trying to install GRUB2 and replace GRUB Legacy in SliTaz because I found that GRUB2 is MUCH easier to deal with than GRUB Legacy.
d) I failed to install GRUB2 within SliTaz from the Package Manager so I talked to someone from Ubuntu's Forum about that and he advised me to use any LiveCD that contains GRUB2 files and use the "Re-install GRUB2" method (https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202) to make it happen. I did it but all what I got was:
grub>
e) I'm here trying to find a better successful way to do so.
I don't want to install any other OS, I'm in the middle of a process of creating my own iso based on SliTaz. Flavor, mixed, whatever you call it ... I'm trying to play around with SliTaz and come up with new flavor/distribution/etc.
I want to use GRUB2 instead of GRUB Legacy. That's a part of my plan. Also, add some other packages.
It is "always" detecting my HDD as /dev/hdb not /dev/hda. Funny thing is, when I was trying to install SliTaz on an USB Drive (I know the method is wrong), it was detecting my USB Drive as /dev/sda.
I have never faced the same problem with any other OS/Distribution.
I know I'm installing SliTaz on a Slave HDD (I unplugged my Master HDD just to see what will happen) but that should not be the issue. I installed Windows on a Slave HDD and it did not complain. I did that with almost 50 other Distributions and they did not complain. Why SliTaz keep insisting to detect my HDD as hdb not hda?
Also, everytime I install SliTaz as the only OS I have, I have to change:
hdd (1,0) to hdd (0,0)
so that it can boot and login. Otherwise, I get a grub error.
I just don't get it?! Never had the same with other OS's.
convert my_flash_drive_name by your flash drive name
in shell under Ubuntu >= 9.10 install grub2 on MBR flash drive LABEL="my_flash_drive_name" DEVICE="`ls -l /dev/disk/by-label|sed -n 's#.*'"$LABEL"'.*/\([a-zA-Z]\+\)[0-9]\+#\1#p'`" sudo grub-install --recheck --root-directory="/media/$LABEL" "/dev/$DEVICE"
and make config file who configure menu entry: sudo grub-mkconfig -o "/media/$LABEL/boot/grub/grub.cfg"
be sure to set boot flag on your usb flash drive: sudo parted "/dev/$DEVICE" set 1 boot on
edit your grub config: sudo gedit "/media/$LABEL/boot/grub/grub.cfg"
don't forget to replace uuid by your flash drive uuid if your OS aren't install in partition 1 change set root='(hd0,1)' on set root='(hd0,2)' for partition 2. and root=/dev/sda1 on root=/dev/sda2 in grub2 partition start at 1. and boot device are always hd0 then don't change it then your grub.cfg must look like it:
### BEGIN /etc/grub.d/00_header ### . . don't change this section if you don't know what you make . ### END /etc/grub.d/00_header ### menuentry "SliTaz 2.6.30.6-slitaz (root on /dev/sda1)" { insmod part_msdos insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set f1721fee-a2de-462d-b511-848865a460b3 linux /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sda1 rootdelay=10 } menuentry "SliTaz 2.6.30.6-slitaz (root on /dev/sdb1)" { insmod part_msdos insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set f1721fee-a2de-462d-b511-848865a460b3 linux /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sdb1 rootdelay=10 } menuentry "SliTaz 2.6.30.6-slitaz (root on /dev/sdc1)" { insmod part_msdos insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set f1721fee-a2de-462d-b511-848865a460b3 linux /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sdc1 rootdelay=10 } menuentry "SliTaz 2.6.30.6-slitaz (root on /dev/sdd1)" { insmod part_msdos insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set f1721fee-a2de-462d-b511-848865a460b3 linux /boot/vmlinuz-2.6.30.6-slitaz root=/dev/sdd1 rootdelay=10 }
and if you don't have add the famous rootdelay (you can run this cmd anyway): sudo sed '/slitaz root=.*rootdelay=/b;/slitaz root=/s/.*/& rootdelay=10/' -i "/media/$LABEL/boot/grub/grub.cfg"
boot instruction: * set usb boot enable in bios * select your usb flash drive in the boot priority menu or directly in your boot menu * under grub select menu entry in function of your number sata drive you have, for 0 sata drive use (root on /dev/sda1) for 1 sata drive use (root on /dev/sdb1)
wseza, I'm not trying to install SliTaz on an USB-Drive. I have already installed SliTaz on my internal HDD on my PC.
Again, the reason why I want to use GRUB2 instead of the default GRUB Legacy in SliTaz is because I want to create my own Remix/Flavor/Remaster/Distro of SliTaz and I need to use GRUB2.
That's why I need GRUB2. I would just install any other OS with GRUB2 and set it to be the default OS which will boot all the other OS's installed on my PC but that's not the case here.
Just one thing. SliTaz is using "hd" instead of "sd" so will that make any difference in the first part of your post? was just wondering because I have a bit of a problem with hd system.
Hahaha, I was just about to post telling you that I got "grub>" exactly as before but now, I got it. I didn't know I have to use "/dev/hda" instead of "/dev/sda".
Now, what shall I do? re-do the same process or shall I format and install SliTaz once again?
Mount your slitaz install at /mnt and copy the files as indicated in my blog.
Chroot into /mnt and install grub.
When you mount your slitaz install, and when you install grub, you have to use the syntax for your hard drive as recognized by your live CD (sudo fdisk -l ; use /dev/hda1 or /dev/sda1 to mount and /dev/sda or /dev/hda to install grub).
SliTaz detect my HDD as "/dev/hdb" because it's a Slave HDD. I can't use Master HDD because it has lots of other OS's which I need. I just unplugged the power cable to make sure nothing wrong might happen.
So, SliTaz detect my HDD as "dev/hdb" while Ubuntu's LiveCD detect my HDD as "/dev/sda".
My understanding was that you were installing Slitaz onto the first hard drive as your only OS.
Now it sounds as if Sliltaz is on a secondary hard drive and you have a boot loader on the first drive ? If that is the case, what boot loader is on the first drive and can you not configure it to boot slitaz ? That would be the easiest solution by far. You can chainload grub 1 (slitaz default) from grub 2 (if grub 2 is on the first hard drive) [you do not need to install grub2 on slitaz to chainload ].
If you are still having problems, you need to describe how are you booting. Are you selecting the second drive in your bios and booting from there? Or are you booting from the first drive ?
Second easiest solution is to leave grub 1 on Slitaz, boot from the first hd, and chainload. Do you know how to do that ?
Next option is to boot the second HD, but you would then need to map your drives. Do you know how to do that ? Do you know the grub terminology for hard drives and partitions ?
In terms on detecting your hard drive / terminology hdb vs sdb , you need to use the syntax of the OS you have booted.
If slitaz recognized your drive as /dev/hdb , use /dev/hdb. If Ubuntu (or any other OS) recognizes it as /dev/sdb , use /dev/sdb. If you do not understand your partitions, review the terminology before you install.
I don't want to write lots of details which might confuse anyone so I'll do my best to make it short and simple:
1- THE MAIN reason why I want to install SliTaz is that I want to play with it and create "my own" remix/distro/flavor or whatever you call it.
2- THE 2nd MAIN reason: I want to use GRUB2 instead of GRUB Legacy. That's part of my plan.
3- I'm using on TEST-PC.
4- My TEST-PC has TWO Hard Disk Drives.
HDD1 is 80GB IDE which has more than 6 OS's (I don't want to touch that one) - Primary Master
HDD2 is 20GB IDE which has SliTaz on the very first Primary Partiton - Primary Slave
5- I did not know that SliTaz, because of hd system, it will detect the HDD as /dev/hdb.
6- I had to disconnect HDD1 just to be in the safe side. Of course I know how to deal with TWO HDDs in the same time but I just unplugged the power cable because I don't need it now.
7- Two months ago, I had a Multi-Boot System on my main PC (9 OS's installed) and I had no problems whatsoever :) I know very well how to deal with such systems as long as GRUB2 is there, I don't need anything at all.
8- Now, here comes troubles. Looks like I still don't know how to deal with GRUB Legacy. I still find it easier to deal with GRUB2. BUT that's only me.
9- I know I can change HDD2 from Slave to Master but I don't want that. I need HDD1 to be the Master.
10- SliTaz has lots of packages which can be installed using the Package Manager. GRUB2 is one of these packages. I installed GRUB2 but I don't know how to make it work instead of GRUB Legacy? I think if someone could explain that, that would be the most easy solution :)
11- Following your steps gave me "grub>" just like the first time. I don't know why is that?
HOOOHAAA, YES, YES, YES, that what I was talking about :D
THANK YOU SO MUCH and there is no need to be sorry, everything is super great :)
I was sure it could be much easier and simpler than the other method. I was just need the last step actually (grub-mkconfig -o /boot/grub/grub.cfg) which is the key to make it work. Thanks again :)
However, I'd like to add two steps I've done before following your steps:
Step1: I removed GRUB Legacy
tazpkg remove grub
Step2: I had to update the packages "recharge" because when I first tried to install GRUB2, it did not work so had to recharge the list.
Now, I can make an iso for SliTaz with GRUB2. Will test it and if it will work, I'm going to start playing with it until I create my own SliTaz version/flavor/remix :)
Speaking of sweet. You can setup grub2 without writing it to the MBR and chainload with grub legacy. If something goes wrong with the grub2 setup you still have grub legacy watching your back :P grub-install --grub-setup=/bin/true /dev/sda Make your grub2 menu. grub-mkconfig -o /boot/grub/grub.cfg Add to /boot/grub/menu.lst title Chainload into GRUB 2 root(hdx,x) kernel /boot/grub/core.img
2) update-grub does not work. If I remember correctly (I'm not on SliTaz now), it says command not found or something like that.
Any idea what shall I do about that?
mojo, I already removed GRUB Legacy but still can see the files sitting there. Maybe next time I'll keep that but as long as GRUB2 is working, I don't think I'll need the old one (GRUB Legacy).
Did not work. I installed another OS (antiX) to see whether GRUB2 will detect it or not but update-grub doesn't exist and the above command did not work.
I'm having other problems with SliTaz so far but that's for another thread.
So, as per my last post ... GRUB2 with SliTaz still did not work the way I wanted.
I did something today. I created an iso file for SliTaz (the current installed one with GRUB2) then I formatted, install again from the new iso with GRUB2.
I got:
sh: grub>
Yet another issue. Any idea what shall I do from there? I did not make /home and I installed from USB "tazusb".