diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-20 07:45:55 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-06-20 07:45:55 +0000 |
commit | 90e6512a409293af26ab61ca205b98de7c6bc6e5 (patch) | |
tree | 4088bc1e8cd884d3ed912e62b7fcf1ac0f9013f0 | |
parent | c9a6337d90964782268688dd8292702bb8335801 (diff) | |
download | drakx-backup-do-not-use-90e6512a409293af26ab61ca205b98de7c6bc6e5.tar drakx-backup-do-not-use-90e6512a409293af26ab61ca205b98de7c6bc6e5.tar.gz drakx-backup-do-not-use-90e6512a409293af26ab61ca205b98de7c6bc6e5.tar.bz2 drakx-backup-do-not-use-90e6512a409293af26ab61ca205b98de7c6bc6e5.tar.xz drakx-backup-do-not-use-90e6512a409293af26ab61ca205b98de7c6bc6e5.zip |
switch from GRUB to LILO since the later now enable to boot from USB
-rwxr-xr-x | globetrotter/make_live | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/globetrotter/make_live b/globetrotter/make_live index f5ea43bcf..66d44385e 100755 --- a/globetrotter/make_live +++ b/globetrotter/make_live @@ -3,8 +3,8 @@ $::isInstall = 1; # for /root/drakx/ddebug.log use strict; -#use lib qw(/usr/lib/libDrakX); -use lib "../perl-install"; +use lib qw(/usr/lib/libDrakX); +use lib "./perl-install"; use standalone; use interactive; use common; @@ -44,12 +44,12 @@ if ($0 =~ /restore_globetrotter/) { $rescue = 1; } -@ARGV = @new_ARGV; - if (!$rescue) { - die qq(\%_install_langs is not set to "all" in /etc/rpm/macros) if cat_('/etc/rpm/macros') !~ /\%_install_langs\s*all/; + die qq(\%_install_langs is not set to "all" in /etc/rpm/macros) if cat_('/etc/rpm/macros') !~ /\%_install_langs\s*all/; } +@ARGV = @new_ARGV; + my @suggestions = ( { mntpoint => "/", size => 4500 << 11, type => 0x483, ratio => 1, maxsize => 6000 << 11, fs_type => 'ext3' }, # splited / and /usr: @@ -59,7 +59,7 @@ my @suggestions = ( # share partition with windows: { mntpoint => "/mnt/share", size => 2000 << 11, type => 0xb, ratio => 3, fs_type => 'vfat' }, - { mntpoint => "/mnt/packages", size => 5000 << 11, type => 0x483, ratio => 3, maxsize => 5000 << 11, fs_type => 'ext3' }, + { mntpoint => "/mnt/packages", size => 5100 << 11, type => 0x483, ratio => 3, maxsize => 5100 << 11, fs_type => 'ext3' }, # allocated last b/c end of disk is usually faster: { mntpoint => "swap", size => 64 << 11, type => 0x82, ratio => 1, maxsize => 500 << 11, fs_type => 'swap' }, ); @@ -68,8 +68,9 @@ my @suggestions = ( sub get_hds() { my $all_hds = fsedit::get_hds(); my $other; + # FIXME: TODO cat_("/sys/block/sda/device/info") =~ /Product: LaCie Hard Drive USB/; ($all_hds->{hds}, $other) = partition { $_->{usb_description} =~ /^LaCie|LaCie Hard( |)Drive USB/ } @{$all_hds->{hds}}; - my_exit("Your disk cannot be restored because it cannot be found!") if !$all_hds->{hds}[0]; + my_exit("Your disk cannot be restored because it cannot be found!") if !$all_hds->{hds}[0]; $all_hds, $all_hds->{hds}[0]; # $other } @@ -182,6 +183,9 @@ sub installPackages() { # help DrakX: mkdir_p("$::prefix/$_") foreach qw(tmp/headers var/lib/rpm root/drakx); + #mkdir_p('/tmp/image'); + #ln_sf('/export/media', '/tmp/image/media/'); + #/tmp/image/media/media_info/hdlists: # help packages' post scripts: mkdir_p("$::prefix/proc"); @@ -195,7 +199,10 @@ sub installPackages() { *install_any::getFile = sub { my ($f, $o_method) = @_; log::l("getFile $f:$o_method"); - open(my $F, '/export/' . install_any::relGetFile($f)) or return; + open(my $F, '/export/' . install_any::relGetFile($f)) or do { + log::l("cannot access $f"); + return; + }; $F; }; @@ -223,7 +230,6 @@ sub installPackages() { #- for screenshots: qw(fb2png), qw(xorg-x11-server xorg-x11-xfs xorg-x11-FBDev), - qw(openssh-server), #- fred wants it qw(alsa-utils cdialog newt), qw(k3b-dvd), qw(davfs nfs-utils samba-server sane-backends xsane xsane-gimp ntp), @@ -231,7 +237,7 @@ sub installPackages() { qw(mountloop), #- crypted folders #- doc: (map { "mandrake-doc-$_" } map { ("Drakxtools-Guide-$_", "Command-Line-$_", "Quick-Startup-Plus-$_", "Starter-$_") } qw(de en es fr it)), - qw(autologin grub), + qw(autologin), qw(synaptics), #- network conf: qw(wireless-tools pcmcia-cs), @@ -252,7 +258,8 @@ sub installPackages() { qw(drakconf drakcronat drakfirsttime drakxtools harddrake-ui mdkonline rpmdrake userdrake), qw(cups cups-drivers foomatic-db gimpprint hpoj libnet-snmp mtools mtoolsfm nmap printer-filters printer-testpages printer-utils scli xojpanel xpp), #- printer stuff #qw(gcc), - "ati-kernel-$dkms_kernel_version", "nvidia-kernel-$dkms_kernel_version", qw(ati nvidia dkms patch dkms-ati dkms-nvidia libMesaGLU1), + #"ati-kernel-$dkms_kernel_version", "nvidia-kernel-$dkms_kernel_version", + qw(ati nvidia dkms patch dkms-ati dkms-nvidia libMesaGLU1), # qw(hcfpcimodem hsflinmodem ltmodem), #- 2.4.x only qw(xinput), #- for some mice qw(bash-completion binutils emacs-X11 ntsysv perl-doc perl-Term-Readline-Gnu vim-enhanced openssh-clients lftp diffstat), #- allow debugging @@ -277,7 +284,7 @@ sub installPackages() { qw(mozilla-firefox), #- plugins: qw(acroread acroread-nppdf acroread-plugins FlashPlayer j2re RealPlayer RealPlayer-Codecs RealPlayer-rpnp), - qw(kdebase-nsplugins kdebase-kcontrol-nsplugins), + qw(kdebase-nsplugins kdebase-kcontrol-nsplugins crossover-plugin-demo), #- fonts: qw(xorg-x11-100dpi-fonts xorg-x11-75dpi-fonts), qw(fonts-bitmap-tscii fonts-hebrew-elmar), @@ -288,7 +295,7 @@ sub installPackages() { my %rpmsrate_flags_chosen = map { $_ => 1 } map { @{$_->{flags}} } @{$o->{compssUsers}}; $rpmsrate_flags_chosen{$_} = 0 foreach qw(CAT_NETWORKING_MAIL_SERVERE); - $rpmsrate_flags_chosen{$_} = 1 foreach qw(CAT_AUDIO CAT_KDE CAT_GNOME CAT_NETWORKING CAT_OFFICE CAT_SYSTEM DVD USB SOUND BURNER UTF8 DOCS TV 3D INSTALL); + $rpmsrate_flags_chosen{$_} = 1 foreach qw(CAT_AUDIO CAT_KDE CAT_GNOME CAT_NETWORKING CAT_OFFICE CAT_SYSTEM DVD USB SOUND BURNER UTF8 DOCS TV 3D INSTALL CAT_VIDEO CAT_GRAPHICS CAT_PRINTER); $rpmsrate_flags_chosen{qq(LOCALES"$_")} = 1 foreach lang::langsLANGUAGE({ all => 1 }); pkgs::setSelectedFromCompssList($o->{packages}, \%rpmsrate_flags_chosen, 4, 0); @@ -302,7 +309,7 @@ sub installPackages() { # unselect some packages whose services fsck up the box and whose services are not enabled by appropriate tools: # (shorewall must be deselected before iptables is) - $unselect->($_) foreach qw(at hpoj shorewall iptables ntp tmdns zcip ); + $unselect->($_) foreach qw(at cups hpoj shorewall iptables ntp tmdns zcip); # unselect uim since uim IM break first time wizard when selecting english: #$unselect->($_) foreach qw(uim-applet uim libuim0); @@ -402,6 +409,8 @@ sub doRootSubst { #fs::merge_info_from_mtab($fstab); fs::write_fstab($all_hds, $::prefix); +cp_af("reset-globetrotter.sh", "$::prefix/sbin"); +chmod(0755, "$::prefix/sbin"); append_to_file("$::prefix/etc/fstab", "none /dev/pts devpts mode=0620 0 0\n", "none /proc proc defaults 0 0\n"); @@ -436,21 +445,18 @@ bootloader::suggest($bootloader, $all_hds, vga_fb => 788, quiet => 1); -# LILO failled to boot from SCSI: -# $bootloader->{method} = 'lilo-graphic'; -$bootloader->{method} = 'grub'; +$bootloader->{method} = 'lilo-graphic'; eval { bootloader::install($bootloader, $all_hds) }; -doRootSubst("$::prefix/boot/grub/menu.lst"); -run_program::rooted($::prefix, 'sh', '/boot/grub/install.sh'); +doRootSubst("$::prefix/etc/lilo.conf"); -# fix GRUB configuration: +# fix LILO configuration: substInFile { - # use FB by default on versionned entries so that the initial versionned entry behave like those created by /sbin/installkernel: - s/$/ vga=788/ if /^kernel.*\d\.\d\.\d/; -} "$::prefix/boot/grub/menu.lst"; + s!root=(LABEL=MDK-ROOT)!root="\1"!g; +} "$::prefix/etc/lilo.conf"; +run_program::rooted($::prefix, 'lilo'); ## disable ISDN by default (bogus isdn4net came with an enabled interface :-(): #substInFile { @@ -463,7 +469,7 @@ print "Post install misc configuration\n"; # clean services: # cups-lpd ibod isdn4linux isdnlog)) { -run_program::rooted($::prefix, '/sbin/chkconfig', '--del', $_) foreach qw(acon jserver oki4daemon); +run_program::rooted($::prefix, '/sbin/chkconfig', '--del', $_) foreach qw(acon jserver oki4daemon postfix); #foreach my $service (qw(acon atd cups-lpd hpoj ibod iptables isdn4linux isdnlog jserver ntpd oki4daemon shorewall tmdns)) { # run_program::rooted($::prefix, '/sbin/chkconfig', '--level', $_, $service, 'off') foreach qw(3 5); #} @@ -474,6 +480,10 @@ foreach my $service (qw(alsa dm harddrake hotplug sound)) { } if ($options{post}) { + # fix xfs permissions: + mkdir_p("$::prefix/tmp/.font-unix/"); + run_program::rooted($::prefix, 'chown', 'xfs.xfs', '/tmp/.font-unix/'); + #------------------------------------------------------------------- # save a few more files in profiles my $prof_cfg = "$::prefix/etc/netprofile/list"; |